Skip to content

Commit

Permalink
NFS: Fix a page leak in uncached_readdir()
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Nov 22, 2010
1 parent e7c58e9 commit 7a8e1dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,14 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent,
goto out;
}

desc->page_index = 0;
desc->page = page;

if (nfs_readdir_xdr_to_array(desc, page, inode) == -1) {
status = -EIO;
goto out_release;
}

desc->page_index = 0;
desc->page = page;
status = nfs_do_filldir(desc, dirent, filldir);

out:
Expand Down

0 comments on commit 7a8e1dc

Please sign in to comment.