Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nilfs2: pass the mapped address to nilfs_check_page()

Remove another use of page_address() as part of preparing for the kmap to
kmap_local transition.

Link: https://lkml.kernel.org/r/20231127143036.2425-8-konishi.ryusuke@gmail.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
a8e61035 09a46acb

+2 -3
+2 -3
fs/nilfs2/dir.c
··· 107 107 unlock_page(page); 108 108 } 109 109 110 - static bool nilfs_check_page(struct page *page) 110 + static bool nilfs_check_page(struct page *page, char *kaddr) 111 111 { 112 112 struct inode *dir = page->mapping->host; 113 113 struct super_block *sb = dir->i_sb; 114 114 unsigned int chunk_size = nilfs_chunk_size(dir); 115 - char *kaddr = page_address(page); 116 115 unsigned int offs, rec_len; 117 116 unsigned int limit = PAGE_SIZE; 118 117 struct nilfs_dir_entry *p; ··· 191 192 192 193 kaddr = kmap(page); 193 194 if (unlikely(!PageChecked(page))) { 194 - if (!nilfs_check_page(page)) 195 + if (!nilfs_check_page(page, kaddr)) 195 196 goto fail; 196 197 } 197 198