]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: replace kmap() with kmap_local_page() in inode.c
authorFabio M. De Francesco <fmdefrancesco@gmail.com>
Tue, 31 May 2022 14:53:33 +0000 (16:53 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:33 +0000 (17:45 +0200)
commitceb419860e8cc6a0a77a9ba9d8ab32031039255f
tree298e494c0f1d10008a47ec68b7592d90593be396
parentf525fbd3c52af46e8557c5303272af39aeec7f1a
btrfs: replace kmap() with kmap_local_page() in inode.c

The use of kmap() is being deprecated in favor of kmap_local_page() where
it is feasible. With kmap_local_page(), the mapping is per thread, CPU
local and not globally visible.

Therefore, use kmap_local_page() / kunmap_local() in inode.c wherever the
mappings are per thread and not globally visible.

Tested on QEMU + KVM 32 bits VM with 4GB of RAM and HIGHMEM64G enabled.

Suggested-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c