Skip to content

Commit 92e0a2b

Browse files
konisakpm00
authored andcommitted
nilfs2: convert nilfs_copy_buffer() to use kmap_local
The routine nilfs_copy_buffer() that copies a block buffer still uses the deprecated kmap_atomic(), so convert it to use kmap_local. Link: https://lkml.kernel.org/r/20240122140202.6950-4-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent f7aeb97 commit 92e0a2b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/nilfs2/page.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ void nilfs_copy_buffer(struct buffer_head *dbh, struct buffer_head *sbh)
103103
struct page *spage = sbh->b_page, *dpage = dbh->b_page;
104104
struct buffer_head *bh;
105105

106-
kaddr0 = kmap_atomic(spage);
107-
kaddr1 = kmap_atomic(dpage);
106+
kaddr0 = kmap_local_page(spage);
107+
kaddr1 = kmap_local_page(dpage);
108108
memcpy(kaddr1 + bh_offset(dbh), kaddr0 + bh_offset(sbh), sbh->b_size);
109-
kunmap_atomic(kaddr1);
110-
kunmap_atomic(kaddr0);
109+
kunmap_local(kaddr1);
110+
kunmap_local(kaddr0);
111111

112112
dbh->b_state = sbh->b_state & NILFS_BUFFER_INHERENT_BITS;
113113
dbh->b_blocknr = sbh->b_blocknr;

0 commit comments

Comments
 (0)