aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-11-20 13:24:46 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-11-22 13:24:45 -0500
commit7a8e1dc34f52fd2927dbf7e520d7cd8eadc51336 (patch)
treede5e01e628e0fec4a20e335ef5a3163e307ba3fa /fs/nfs/dir.c
parente7c58e974a0318fcca5368e7b3570e10e9ae9028 (diff)
NFS: Fix a page leak in uncached_readdir()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 42e66e961d73..353f47c31b1d 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -763,13 +763,14 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent,
763 goto out; 763 goto out;
764 } 764 }
765 765
766 desc->page_index = 0;
767 desc->page = page;
768
766 if (nfs_readdir_xdr_to_array(desc, page, inode) == -1) { 769 if (nfs_readdir_xdr_to_array(desc, page, inode) == -1) {
767 status = -EIO; 770 status = -EIO;
768 goto out_release; 771 goto out_release;
769 } 772 }
770 773
771 desc->page_index = 0;
772 desc->page = page;
773 status = nfs_do_filldir(desc, dirent, filldir); 774 status = nfs_do_filldir(desc, dirent, filldir);
774 775
775 out: 776 out: