mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-27 01:11:31 +00:00
ubifs: Convert to release_folio
Use folios throughout the release_folio path. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jeff Layton <jlayton@kernel.org>
This commit is contained in:
parent
dc2e58b24a
commit
bcaabc5549
1 changed files with 9 additions and 9 deletions
|
|
@ -1484,22 +1484,22 @@ static int ubifs_migrate_page(struct address_space *mapping,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int ubifs_releasepage(struct page *page, gfp_t unused_gfp_flags)
|
static bool ubifs_release_folio(struct folio *folio, gfp_t unused_gfp_flags)
|
||||||
{
|
{
|
||||||
struct inode *inode = page->mapping->host;
|
struct inode *inode = folio->mapping->host;
|
||||||
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An attempt to release a dirty page without budgeting for it - should
|
* An attempt to release a dirty page without budgeting for it - should
|
||||||
* not happen.
|
* not happen.
|
||||||
*/
|
*/
|
||||||
if (PageWriteback(page))
|
if (folio_test_writeback(folio))
|
||||||
return 0;
|
return false;
|
||||||
ubifs_assert(c, PagePrivate(page));
|
ubifs_assert(c, folio_test_private(folio));
|
||||||
ubifs_assert(c, 0);
|
ubifs_assert(c, 0);
|
||||||
detach_page_private(page);
|
folio_detach_private(folio);
|
||||||
ClearPageChecked(page);
|
folio_clear_checked(folio);
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1652,7 +1652,7 @@ const struct address_space_operations ubifs_file_address_operations = {
|
||||||
#ifdef CONFIG_MIGRATION
|
#ifdef CONFIG_MIGRATION
|
||||||
.migratepage = ubifs_migrate_page,
|
.migratepage = ubifs_migrate_page,
|
||||||
#endif
|
#endif
|
||||||
.releasepage = ubifs_releasepage,
|
.release_folio = ubifs_release_folio,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct inode_operations ubifs_file_inode_operations = {
|
const struct inode_operations ubifs_file_inode_operations = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue