Skip to content

Commit 1f1d14d

Browse files
author
Matthew Wilcox (Oracle)
committed
ubifs: Convert ubifs_set_page_dirty to ubifs_dirty_folio
Removes a call to __set_page_dirty_nobuffers(). Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Tested-by: Damien Le Moal <[email protected]> Acked-by: Damien Le Moal <[email protected]> Tested-by: Mike Marshall <[email protected]> # orangefs Tested-by: David Howells <[email protected]> # afs
1 parent cbc975b commit 1f1d14d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fs/ubifs/file.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,18 +1445,18 @@ static ssize_t ubifs_write_iter(struct kiocb *iocb, struct iov_iter *from)
14451445
return generic_file_write_iter(iocb, from);
14461446
}
14471447

1448-
static int ubifs_set_page_dirty(struct page *page)
1448+
static bool ubifs_dirty_folio(struct address_space *mapping,
1449+
struct folio *folio)
14491450
{
1450-
int ret;
1451-
struct inode *inode = page->mapping->host;
1452-
struct ubifs_info *c = inode->i_sb->s_fs_info;
1451+
bool ret;
1452+
struct ubifs_info *c = mapping->host->i_sb->s_fs_info;
14531453

1454-
ret = __set_page_dirty_nobuffers(page);
1454+
ret = filemap_dirty_folio(mapping, folio);
14551455
/*
14561456
* An attempt to dirty a page without budgeting for it - should not
14571457
* happen.
14581458
*/
1459-
ubifs_assert(c, ret == 0);
1459+
ubifs_assert(c, ret == false);
14601460
return ret;
14611461
}
14621462

@@ -1647,7 +1647,7 @@ const struct address_space_operations ubifs_file_address_operations = {
16471647
.write_begin = ubifs_write_begin,
16481648
.write_end = ubifs_write_end,
16491649
.invalidate_folio = ubifs_invalidate_folio,
1650-
.set_page_dirty = ubifs_set_page_dirty,
1650+
.dirty_folio = ubifs_dirty_folio,
16511651
#ifdef CONFIG_MIGRATION
16521652
.migratepage = ubifs_migrate_page,
16531653
#endif

0 commit comments

Comments
 (0)