summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-01 00:35:39 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-09 23:12:33 -0400
commitbe6b969c9b2fc5365c988634ffafd186146aee93 (patch)
tree733e8c05ac24193af13c43f2204e9e2cd4b4f90f
parent704ead2bed202579f025a4754e52e9ab21ff3ada (diff)
downloadlinux-be6b969c9b2fc5365c988634ffafd186146aee93.tar.bz2
reiserfs: Convert release_buffer_page() to use a folio
Saves 671 bytes from an allmodconfig build (!) Function old new delta release_buffer_page 1617 946 -671 Total: Before=67656, After=66985, chg -0.99% Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jeff Layton <jlayton@kernel.org>
-rw-r--r--fs/reiserfs/journal.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index b5b6f6201bed..99ba495b0f28 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -601,14 +601,14 @@ static int journal_list_still_alive(struct super_block *s,
*/
static void release_buffer_page(struct buffer_head *bh)
{
- struct page *page = bh->b_page;
- if (!page->mapping && trylock_page(page)) {
- get_page(page);
+ struct folio *folio = page_folio(bh->b_page);
+ if (!folio->mapping && folio_trylock(folio)) {
+ folio_get(folio);
put_bh(bh);
- if (!page->mapping)
- try_to_free_buffers(page);
- unlock_page(page);
- put_page(page);
+ if (!folio->mapping)
+ try_to_free_buffers(&folio->page);
+ folio_unlock(folio);
+ folio_put(folio);
} else {
put_bh(bh);
}