]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gfs2: Use b_folio in gfs2_trans_add_meta()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 10 Feb 2025 13:34:40 +0000 (13:34 +0000)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 10 Mar 2025 17:15:39 +0000 (18:15 +0100)
The lock bit is maintained on the folio, not on the page.  Saves two
calls to compound_head() as well as removing two references to
bh->b_page.

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

index 192213c7359af12e1079674f243bc236f1cb7252..f8ae2c666fd609c39df324d2f77df6b8cc9207c2 100644 (file)
@@ -246,12 +246,12 @@ void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh)
        if (bd == NULL) {
                gfs2_log_unlock(sdp);
                unlock_buffer(bh);
-               lock_page(bh->b_page);
+               folio_lock(bh->b_folio);
                if (bh->b_private == NULL)
                        bd = gfs2_alloc_bufdata(gl, bh);
                else
                        bd = bh->b_private;
-               unlock_page(bh->b_page);
+               folio_unlock(bh->b_folio);
                lock_buffer(bh);
                gfs2_log_lock(sdp);
        }