Skip to content

Commit e6ff5f2

Browse files
Matthew Wilcox (Oracle)Andreas Gruenbacher
authored andcommitted
gfs2: Use b_folio in gfs2_check_magic()
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>
1 parent 072d732 commit e6ff5f2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

fs/gfs2/lops.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -615,15 +615,13 @@ static struct page *gfs2_get_log_desc(struct gfs2_sbd *sdp, u32 ld_type,
615615

616616
static void gfs2_check_magic(struct buffer_head *bh)
617617
{
618-
void *kaddr;
619618
__be32 *ptr;
620619

621620
clear_buffer_escaped(bh);
622-
kaddr = kmap_local_page(bh->b_page);
623-
ptr = kaddr + bh_offset(bh);
621+
ptr = kmap_local_folio(bh->b_folio, bh_offset(bh));
624622
if (*ptr == cpu_to_be32(GFS2_MAGIC))
625623
set_buffer_escaped(bh);
626-
kunmap_local(kaddr);
624+
kunmap_local(ptr);
627625
}
628626

629627
static int blocknr_cmp(void *priv, const struct list_head *a,

0 commit comments

Comments
 (0)