diff options
-rw-r--r-- | fs/ext4/inode.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index c6b8cb4949f1..52c46ac5bc8a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3243,19 +3243,19 @@ static void ext4_journalled_invalidate_folio(struct folio *folio, WARN_ON(__ext4_journalled_invalidate_folio(folio, offset, length) < 0); } -static int ext4_releasepage(struct page *page, gfp_t wait) +static bool ext4_release_folio(struct folio *folio, gfp_t wait) { - journal_t *journal = EXT4_JOURNAL(page->mapping->host); + journal_t *journal = EXT4_JOURNAL(folio->mapping->host); - trace_ext4_releasepage(page); + trace_ext4_releasepage(&folio->page); /* Page has dirty journalled data -> cannot release */ - if (PageChecked(page)) - return 0; + if (folio_test_checked(folio)) + return false; if (journal) - return jbd2_journal_try_to_free_buffers(journal, page); + return jbd2_journal_try_to_free_buffers(journal, &folio->page); else - return try_to_free_buffers(page); + return try_to_free_buffers(&folio->page); } static bool ext4_inode_datasync_dirty(struct inode *inode) @@ -3618,7 +3618,7 @@ static const struct address_space_operations ext4_aops = { .dirty_folio = ext4_dirty_folio, .bmap = ext4_bmap, .invalidate_folio = ext4_invalidate_folio, - .releasepage = ext4_releasepage, + .release_folio = ext4_release_folio, .direct_IO = noop_direct_IO, .migratepage = buffer_migrate_page, .is_partially_uptodate = block_is_partially_uptodate, @@ -3636,7 +3636,7 @@ static const struct address_space_operations ext4_journalled_aops = { .dirty_folio = ext4_journalled_dirty_folio, .bmap = ext4_bmap, .invalidate_folio = ext4_journalled_invalidate_folio, - .releasepage = ext4_releasepage, + .release_folio = ext4_release_folio, .direct_IO = noop_direct_IO, .is_partially_uptodate = block_is_partially_uptodate, .error_remove_page = generic_error_remove_page, @@ -3653,7 +3653,7 @@ static const struct address_space_operations ext4_da_aops = { .dirty_folio = ext4_dirty_folio, .bmap = ext4_bmap, .invalidate_folio = ext4_invalidate_folio, - .releasepage = ext4_releasepage, + .release_folio = ext4_release_folio, .direct_IO = noop_direct_IO, .migratepage = buffer_migrate_page, .is_partially_uptodate = block_is_partially_uptodate, |