diff mbox series

[4.9] NFS: Don't map array page twice

Message ID 20200218225331.23665-1-nazard@nazar.ca (mailing list archive)
State New, archived
Headers show
Series [4.9] NFS: Don't map array page twice | expand

Commit Message

Doug Nazar Feb. 18, 2020, 10:53 p.m. UTC
When 4b310319c6a8 ("NFS: Fix memory leaks and corruption in readdir") was
backported (as 67a56e974317 in 4.9-stable) it added a kmap(page), however
in this branch, the page has already been mapped as the array via
nfs_readdir_get_array().

Fixes: 67a56e974317 ("NFS: Fix memory leaks and corruption in readdir")
Signed-off-by: Doug Nazar <nazard@nazar.ca>
---
 fs/nfs/dir.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index c2665d920cf8..2517fcd423b6 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -678,8 +678,6 @@  int nfs_readdir_xdr_to_array(nfs_readdir_descriptor_t *desc, struct page *page,
 		goto out_label_free;
 	}
 
-	array = kmap(page);
-
 	status = nfs_readdir_alloc_pages(pages, array_size);
 	if (status < 0)
 		goto out_release_array;