From: Trond Myklebust Date: Thu, 25 Aug 2005 23:25:35 +0000 (-0700) Subject: NFS: Don't expose internal READDIR errors to userspace X-Git-Tag: firefly_0821_release~40857^2~93 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9aa48b7e270d13c8781414dce081a42cae20a80d;p=firefly-linux-kernel-4.4.55.git NFS: Don't expose internal READDIR errors to userspace Fixes a condition whereby the kernel is returning the non-POSIX error EBADCOOKIE to userspace. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 94a7fcee0624..c70eabd6d179 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -565,8 +565,6 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) } } unlock_kernel(); - if (desc->error < 0) - return desc->error; if (res < 0) return res; return 0;