소스 검색

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 <Trond.Myklebust@netapp.com>
Trond Myklebust 19 년 전
부모
커밋
9aa48b7e27
1개의 변경된 파일0개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 2
      fs/nfs/dir.c

+ 0 - 2
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;