nilfs2: localize highmem mapping for checkpoint reading within cpfile
authorRyusuke Konishi <konishi.ryusuke@gmail.com>
Mon, 22 Jan 2024 14:02:00 +0000 (23:02 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 23:38:53 +0000 (15:38 -0800)
commit1244a6d7a2c1de669f9682e8a0bd46a53c3be233
tree3935275b9db3fb90251505975ad34e8d1e9d8226
parentcce259b4c3b13a82541992c56f9c8238451da859
nilfs2: localize highmem mapping for checkpoint reading within cpfile

Move the code for reading from a checkpoint entry that is performed in
nilfs_attach_checkpoint() to the cpfile side, and make the page mapping
local and temporary.  And use kmap_local instead of kmap to access the
checkpoint entry page.

In order to load the ifile inode information included in the checkpoint
entry within the inode lock section of nilfs_ifile_read(), the newly added
checkpoint reading method nilfs_cpfile_read_checkpoint() is called
indirectly via nilfs_ifile_read() instead of from
nilfs_attach_checkpoint().

Link: https://lkml.kernel.org/r/20240122140202.6950-14-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/nilfs2/cpfile.c
fs/nilfs2/cpfile.h
fs/nilfs2/ifile.c
fs/nilfs2/ifile.h
fs/nilfs2/super.c