mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
ubifs: Convert from invalidatepage to invalidate_folio
This is a straightfoward conversion. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs Tested-by: David Howells <dhowells@redhat.com> # afs
This commit is contained in:
parent
d97dfc9484
commit
58a2fdb61b
@ -1287,25 +1287,25 @@ int ubifs_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
|
||||
return err;
|
||||
}
|
||||
|
||||
static void ubifs_invalidatepage(struct page *page, unsigned int offset,
|
||||
unsigned int length)
|
||||
static void ubifs_invalidate_folio(struct folio *folio, size_t offset,
|
||||
size_t length)
|
||||
{
|
||||
struct inode *inode = page->mapping->host;
|
||||
struct inode *inode = folio->mapping->host;
|
||||
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
||||
|
||||
ubifs_assert(c, PagePrivate(page));
|
||||
if (offset || length < PAGE_SIZE)
|
||||
/* Partial page remains dirty */
|
||||
ubifs_assert(c, folio_test_private(folio));
|
||||
if (offset || length < folio_size(folio))
|
||||
/* Partial folio remains dirty */
|
||||
return;
|
||||
|
||||
if (PageChecked(page))
|
||||
if (folio_test_checked(folio))
|
||||
release_new_page_budget(c);
|
||||
else
|
||||
release_existing_page_budget(c);
|
||||
|
||||
atomic_long_dec(&c->dirty_pg_cnt);
|
||||
ClearPagePrivate(page);
|
||||
ClearPageChecked(page);
|
||||
folio_clear_private(folio);
|
||||
folio_clear_checked(folio);
|
||||
}
|
||||
|
||||
int ubifs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
||||
@ -1646,7 +1646,7 @@ const struct address_space_operations ubifs_file_address_operations = {
|
||||
.writepage = ubifs_writepage,
|
||||
.write_begin = ubifs_write_begin,
|
||||
.write_end = ubifs_write_end,
|
||||
.invalidatepage = ubifs_invalidatepage,
|
||||
.invalidate_folio = ubifs_invalidate_folio,
|
||||
.set_page_dirty = ubifs_set_page_dirty,
|
||||
#ifdef CONFIG_MIGRATION
|
||||
.migratepage = ubifs_migrate_page,
|
||||
|
Loading…
Reference in New Issue
Block a user