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>
This commit is contained in:
Matthew Wilcox (Oracle) 2022-05-01 00:35:39 -04:00
parent 704ead2bed
commit be6b969c9b
1 changed files with 7 additions and 7 deletions

View File

@ -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);
}