]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
nilfs2: convert segment buffer to use kmap_local
authorRyusuke Konishi <konishi.ryusuke@gmail.com>
Mon, 22 Jan 2024 14:01:49 +0000 (23:01 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 23:38:53 +0000 (15:38 -0800)
In the segment buffer code used for log writing, a CRC calculation routine
uses the deprecated kmap_atomic(), so convert it to use kmap_local.

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

index 6e59dc19a732498a64ebdbdea43fd14c88e2f0aa..dc431b4c34c96c9e17a1ae89383f6dcfe76b3148 100644 (file)
@@ -220,9 +220,9 @@ static void nilfs_segbuf_fill_in_data_crc(struct nilfs_segment_buffer *segbuf,
                crc = crc32_le(crc, bh->b_data, bh->b_size);
        }
        list_for_each_entry(bh, &segbuf->sb_payload_buffers, b_assoc_buffers) {
-               kaddr = kmap_atomic(bh->b_page);
+               kaddr = kmap_local_page(bh->b_page);
                crc = crc32_le(crc, kaddr + bh_offset(bh), bh->b_size);
-               kunmap_atomic(kaddr);
+               kunmap_local(kaddr);
        }
        raw_sum->ss_datasum = cpu_to_le32(crc);
 }