NFS: Fix a page leak in uncached_readdir()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust 2010-11-20 13:24:46 -05:00
parent e7c58e974a
commit 7a8e1dc34f
1 changed files with 3 additions and 2 deletions

View File

@ -763,13 +763,14 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent,
goto out; goto out;
} }
desc->page_index = 0;
desc->page = page;
if (nfs_readdir_xdr_to_array(desc, page, inode) == -1) { if (nfs_readdir_xdr_to_array(desc, page, inode) == -1) {
status = -EIO; status = -EIO;
goto out_release; goto out_release;
} }
desc->page_index = 0;
desc->page = page;
status = nfs_do_filldir(desc, dirent, filldir); status = nfs_do_filldir(desc, dirent, filldir);
out: out: