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:
parent
704ead2bed
commit
be6b969c9b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user