summaryrefslogtreecommitdiffstats
path: root/fs/fuse/readdir.c
diff options
context:
space:
mode:
authorPeng Hao <flyingpeng@tencent.com>2021-09-08 16:38:28 +0800
committerMiklos Szeredi <mszeredi@redhat.com>2021-10-22 17:03:01 +0200
commit5fe0fc9f1de63de748b87f121c038d39192a271d (patch)
treeb9553fb2b3a09efa7044b1f667ef3c7c4f28d445 /fs/fuse/readdir.c
parentbda9a71980e083699a0360963c0135657b73f47a (diff)
downloadlinux-5fe0fc9f1de63de748b87f121c038d39192a271d.tar.gz
linux-5fe0fc9f1de63de748b87f121c038d39192a271d.tar.bz2
linux-5fe0fc9f1de63de748b87f121c038d39192a271d.zip
fuse: use kmap_local_page()
Due to the introduction of kmap_local_*, the storage of slots used for short-term mapping has changed from per-CPU to per-thread. kmap_atomic() disable preemption, while kmap_local_*() only disable migration. There is no need to disable preemption in several kamp_atomic places used in fuse. Link: https://lwn.net/Articles/836144/ Signed-off-by: Peng Hao <flyingpeng@tencent.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/readdir.c')
-rw-r--r--fs/fuse/readdir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/readdir.c b/fs/fuse/readdir.c
index bc267832310c..e38ac983435a 100644
--- a/fs/fuse/readdir.c
+++ b/fs/fuse/readdir.c
@@ -76,11 +76,11 @@ static void fuse_add_dirent_to_cache(struct file *file,
WARN_ON(fi->rdc.pos != pos))
goto unlock;
- addr = kmap_atomic(page);
+ addr = kmap_local_page(page);
if (!offset)
clear_page(addr);
memcpy(addr + offset, dirent, reclen);
- kunmap_atomic(addr);
+ kunmap_local(addr);
fi->rdc.size = (index << PAGE_SHIFT) + offset + reclen;
fi->rdc.pos = dirent->off;
unlock: