]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gfs2: Use b_folio in gfs2_check_magic()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 10 Feb 2025 13:34:42 +0000 (13:34 +0000)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 10 Mar 2025 17:15:39 +0000 (18:15 +0100)
We are preparing to remove bh->b_page.  Use kmap_local_folio() instead
of kmap_local_page().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/lops.c

index d27f34688ff5b5ae6dbb0db4e64407eefc2ff675..4123bfc1668084803367b7a47cea524b59664499 100644 (file)
@@ -615,15 +615,13 @@ static struct page *gfs2_get_log_desc(struct gfs2_sbd *sdp, u32 ld_type,
 
 static void gfs2_check_magic(struct buffer_head *bh)
 {
-       void *kaddr;
        __be32 *ptr;
 
        clear_buffer_escaped(bh);
-       kaddr = kmap_local_page(bh->b_page);
-       ptr = kaddr + bh_offset(bh);
+       ptr = kmap_local_folio(bh->b_folio, bh_offset(bh));
        if (*ptr == cpu_to_be32(GFS2_MAGIC))
                set_buffer_escaped(bh);
-       kunmap_local(kaddr);
+       kunmap_local(ptr);
 }
 
 static int blocknr_cmp(void *priv, const struct list_head *a,