Skip to content

Commit

Permalink
NFS: Fix the error handling in "uncached_readdir()"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Nov 22, 2010
1 parent 7a8e1dc commit 85f8607
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,9 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent,
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);

Expand Down

0 comments on commit 85f8607

Please sign in to comment.