]> git.baikalelectronics.ru Git - kernel.git/commit
EXPORTFS: handle NULL returns from fh_to_dentry()/fh_to_parent()
authorJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 8 Dec 2008 23:24:18 +0000 (18:24 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Dec 2008 03:49:32 +0000 (19:49 -0800)
commitb70c0a6518a8aa328f5253e1e27b0afa8e47cb6d
tree6d2f25c48d2f46215424476182e09ae7f14cc7aa
parent91db9e3e46810b37e6d6e2befc697d869c27e067
EXPORTFS: handle NULL returns from fh_to_dentry()/fh_to_parent()

While 0afa1428dda "[PATCH] switch all filesystems over to
d_obtain_alias" removed some cases where fh_to_dentry() and
fh_to_parent() could return NULL, there are still a few NULL returns
left in individual filesystems.  Thus it was a mistake for that commit
to remove the handling of NULL returns in the callers.

Revert those parts of 0afa1428dda which removed the NULL handling.

(We could, alternatively, modify all implementations to return -ESTALE
instead of NULL, but that proves to require fixing a number of
filesystems, and in some cases it's arguably more natural to return
NULL.)

Thanks to David for original patch and Linus, Christoph, and Hugh for
review.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: David Howells <dhowells@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/exportfs/expfs.c