NFS: Fix the error handling in "uncached_readdir()"
Currently, uncached_readdir() is broken because if fails to handle
the results from nfs_readdir_xdr_to_array() correctly.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 353f47c..2492bac 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -766,10 +766,9 @@
desc->page_index = 0;
desc->page = page;
- if (nfs_readdir_xdr_to_array(desc, page, inode) == -1) {
- status = -EIO;
+ status = nfs_readdir_xdr_to_array(desc, page, inode);
+ if (status < 0)
goto out_release;
- }
status = nfs_do_filldir(desc, dirent, filldir);