diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-04-30 23:33:38 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-09 23:12:33 -0400 |
commit | 3c402f1543cc0136eecd6c5d6a8aef22d7ad723b (patch) | |
tree | 3b4be0956a5663ef2e9a19200b04def241b4d9b9 /fs | |
parent | 8c5de05e41d4850db271f35fe25f8dd43e4beaeb (diff) | |
download | linux-3c402f1543cc0136eecd6c5d6a8aef22d7ad723b.tar.bz2 |
ext4: Convert to release_folio
The use of folios should be pushed deeper into ext4 from here.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs')
-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, |