diff mbox series

[v2,07/16] NFS: Replace kmap() with kmap_atomic() in nfs_readdir_search_array()

Message ID 20201103153329.531942-8-trondmy@kernel.org (mailing list archive)
State New, archived
Headers show
Series Readdir enhancements | expand

Commit Message

Trond Myklebust Nov. 3, 2020, 3:33 p.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/dir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ba3521dcd0c8..52fa0bcf3d1d 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -448,7 +448,7 @@  int nfs_readdir_search_array(nfs_readdir_descriptor_t *desc)
 	struct nfs_cache_array *array;
 	int status;
 
-	array = kmap(desc->page);
+	array = kmap_atomic(desc->page);
 
 	if (desc->dir_cookie == 0)
 		status = nfs_readdir_search_for_pos(array, desc);
@@ -460,7 +460,7 @@  int nfs_readdir_search_array(nfs_readdir_descriptor_t *desc)
 		desc->current_index += array->size;
 		desc->page_index++;
 	}
-	kunmap(desc->page);
+	kunmap_atomic(array);
 	return status;
 }