]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: check d_can_lookup in fh_verify of directories
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 19 Jul 2016 21:33:04 +0000 (17:33 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 4 Aug 2016 21:11:48 +0000 (17:11 -0400)
commit7d01fab7b99b5a7edfe621d72953a448e247e755
treef87cc0dee5dbb4f22fda8ab3c92dba6e83b75a29
parentaa5c867911ba1c1dc6727ca956cfd4cfd07c62d4
nfsd: check d_can_lookup in fh_verify of directories

Create and other nfsd ops generally assume we can call lookup_one_len on
inodes with S_IFDIR set.  Al says that this assumption isn't true in
general, though it should be for the filesystem objects nfsd sees.

Add a check just to make sure our assumption isn't violated.

Remove a couple checks for i_op->lookup in create code.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfsfh.c
fs/nfsd/vfs.c