Home
last modified time | relevance | path

Searched hist:c3c6833ea8114a18d5acf5f9a4d32f864103144c (Results 1 – 1 of 1) sorted by relevance

/linux/fs/ecryptfs/
H A Dread_write.cdiff c3c6833ea8114a18d5acf5f9a4d32f864103144c Wed Apr 26 19:22:22 CEST 2023 Fabio M. De Francesco <fmdefrancesco@gmail.com> fs/ecryptfs: Use kmap_local_page() in ecryptfs_write()

kmap_atomic() is deprecated in favor of kmap_local_page().

Therefore, replace kmap_atomic() with kmap_local_page() in
ecryptfs_write().

kmap_atomic() is implemented like kmap_local_page() which also disables
page-faults and preemption (the latter only for !PREEMPT_RT kernels).

The code within the mapping/un-mapping in ecryptfs_write() does not
depend on the above-mentioned side effects so that a mere replacement of
the old API with the new one is all that is required (i.e., there is no
need to explicitly call pagefault_disable() and/or preempt_disable()).

Tested in a QEMU/KVM x86_32 VM, 6GB RAM, booting a kernel with
HIGHMEM64GB enabled.

Suggested-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Message-Id: <20230426172223.8896-3-fmdefrancesco@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>