]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: fix failure to set eof in readdir in some situations
authorJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 30 Oct 2008 17:48:33 +0000 (13:48 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 30 Oct 2008 21:16:49 +0000 (17:16 -0400)
commit4db43b57d148a6b59e9ad9698a4185d5c2cb566b
tree78c848023b6fbefcd387602529c6e87039f4946e
parente386fa4d2a2f6b764c179d02d1afca0625418a6b
nfsd: fix failure to set eof in readdir in some situations

Before 3a44e3d51fd9a70f3a2dd93791237f49f98579bc "[PATCH] Copy XFS
readdir hack into nfsd code", readdir_cd->err was reset to eof before
each call to vfs_readdir; afterwards, it is set only once.  Similarly,
53feacff00f61eb6aee9718ae9e62afa33889619 "[PATCH] Optimise NFS readdir
hack slightly", can cause us to exit without nfserr_eof set.  Fix this.

This ensures the "eof" bit is set when needed in readdir replies.  (The
particular case I saw was an nfsv4 readdir of an empty directory, which
returned with no entries (the protocol requires "." and ".." to be
filtered out), but with eof unset.)

Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/vfs.c