History

ubifs: Convert to release_folio

Use folios throughout the release_folio path.

Matthew Wilcox (Oracle) committed 4 years ago

Commit bcaabc51 parent dc2e58b1 file · +9 −9Browse files

Unified · Split

fs/ubifs/file.c+9−9
@@ -1484,22 +1484,22 @@ static int ubifs_migrate_page(struct address_space *mapping, · 1483 unmodified lines
14841484 }
14851485 #endif
14861486
1487−static int ubifs_releasepage(struct page *page, gfp_t unused_gfp_flags)
1487+static bool ubifs_release_folio(struct folio *folio, gfp_t unused_gfp_flags)
14881488 {
1489− struct inode *inode = page->mapping->host;
1489+ struct inode *inode = folio->mapping->host;
14901490 struct ubifs_info *c = inode->i_sb->s_fs_info;
14911491
14921492 /*
14931493 * An attempt to release a dirty page without budgeting for it - should
14941494 * not happen.
14951495 */
1496− if (PageWriteback(page))
1497− return 0;
1498− ubifs_assert(c, PagePrivate(page));
1496+ if (folio_test_writeback(folio))
1497+ return false;
1498+ ubifs_assert(c, folio_test_private(folio));
14991499 ubifs_assert(c, 0);
1500− detach_page_private(page);
1501− ClearPageChecked(page);
1502− return 1;
1500+ folio_detach_private(folio);
1501+ folio_clear_checked(folio);
1502+ return true;
15031503 }
15041504
15051505 /*
@@ -1652,7 +1652,7 @@ const struct address_space_operations ubifs_file_address_operations = { · 146 unmodified lines
16521652 #ifdef CONFIG_MIGRATION
16531653 .migratepage = ubifs_migrate_page,
16541654 #endif
1655− .releasepage = ubifs_releasepage,
1655+ .release_folio = ubifs_release_folio,
16561656 };
16571657
16581658 const struct inode_operations ubifs_file_inode_operations = {