mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
ubifs: Convert ubifs_set_page_dirty to ubifs_dirty_folio
Removes a call to __set_page_dirty_nobuffers(). 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
cbc975b182
commit
1f1d14dbc3
@ -1445,18 +1445,18 @@ static ssize_t ubifs_write_iter(struct kiocb *iocb, struct iov_iter *from)
|
|||||||
return generic_file_write_iter(iocb, from);
|
return generic_file_write_iter(iocb, from);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ubifs_set_page_dirty(struct page *page)
|
static bool ubifs_dirty_folio(struct address_space *mapping,
|
||||||
|
struct folio *folio)
|
||||||
{
|
{
|
||||||
int ret;
|
bool ret;
|
||||||
struct inode *inode = page->mapping->host;
|
struct ubifs_info *c = mapping->host->i_sb->s_fs_info;
|
||||||
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
|
||||||
|
|
||||||
ret = __set_page_dirty_nobuffers(page);
|
ret = filemap_dirty_folio(mapping, folio);
|
||||||
/*
|
/*
|
||||||
* An attempt to dirty a page without budgeting for it - should not
|
* An attempt to dirty a page without budgeting for it - should not
|
||||||
* happen.
|
* happen.
|
||||||
*/
|
*/
|
||||||
ubifs_assert(c, ret == 0);
|
ubifs_assert(c, ret == false);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1647,7 +1647,7 @@ const struct address_space_operations ubifs_file_address_operations = {
|
|||||||
.write_begin = ubifs_write_begin,
|
.write_begin = ubifs_write_begin,
|
||||||
.write_end = ubifs_write_end,
|
.write_end = ubifs_write_end,
|
||||||
.invalidate_folio = ubifs_invalidate_folio,
|
.invalidate_folio = ubifs_invalidate_folio,
|
||||||
.set_page_dirty = ubifs_set_page_dirty,
|
.dirty_folio = ubifs_dirty_folio,
|
||||||
#ifdef CONFIG_MIGRATION
|
#ifdef CONFIG_MIGRATION
|
||||||
.migratepage = ubifs_migrate_page,
|
.migratepage = ubifs_migrate_page,
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user