Skip to content

Commit 3f2fc84

Browse files
Matthew Wilcox (Oracle)Andreas Gruenbacher
authored andcommitted
gfs2: Use b_folio in gfs2_trans_add_meta()
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>
1 parent 6576742 commit 3f2fc84

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/gfs2/trans.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh)
246246
if (bd == NULL) {
247247
gfs2_log_unlock(sdp);
248248
unlock_buffer(bh);
249-
lock_page(bh->b_page);
249+
folio_lock(bh->b_folio);
250250
if (bh->b_private == NULL)
251251
bd = gfs2_alloc_bufdata(gl, bh);
252252
else
253253
bd = bh->b_private;
254-
unlock_page(bh->b_page);
254+
folio_unlock(bh->b_folio);
255255
lock_buffer(bh);
256256
gfs2_log_lock(sdp);
257257
}

0 commit comments

Comments
 (0)