mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
f2fs: Convert f2fs_set_node_page_dirty to f2fs_dirty_node_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
4f5e34f713
commit
cbc975b182
@ -2132,23 +2132,24 @@ skip_write:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int f2fs_set_node_page_dirty(struct page *page)
|
||||
static bool f2fs_dirty_node_folio(struct address_space *mapping,
|
||||
struct folio *folio)
|
||||
{
|
||||
trace_f2fs_set_page_dirty(page, NODE);
|
||||
trace_f2fs_set_page_dirty(&folio->page, NODE);
|
||||
|
||||
if (!PageUptodate(page))
|
||||
SetPageUptodate(page);
|
||||
if (!folio_test_uptodate(folio))
|
||||
folio_mark_uptodate(folio);
|
||||
#ifdef CONFIG_F2FS_CHECK_FS
|
||||
if (IS_INODE(page))
|
||||
f2fs_inode_chksum_set(F2FS_P_SB(page), page);
|
||||
if (IS_INODE(&folio->page))
|
||||
f2fs_inode_chksum_set(F2FS_P_SB(&folio->page), &folio->page);
|
||||
#endif
|
||||
if (!PageDirty(page)) {
|
||||
__set_page_dirty_nobuffers(page);
|
||||
inc_page_count(F2FS_P_SB(page), F2FS_DIRTY_NODES);
|
||||
set_page_private_reference(page);
|
||||
return 1;
|
||||
if (!folio_test_dirty(folio)) {
|
||||
filemap_dirty_folio(mapping, folio);
|
||||
inc_page_count(F2FS_P_SB(&folio->page), F2FS_DIRTY_NODES);
|
||||
set_page_private_reference(&folio->page);
|
||||
return true;
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2157,7 +2158,7 @@ static int f2fs_set_node_page_dirty(struct page *page)
|
||||
const struct address_space_operations f2fs_node_aops = {
|
||||
.writepage = f2fs_write_node_page,
|
||||
.writepages = f2fs_write_node_pages,
|
||||
.set_page_dirty = f2fs_set_node_page_dirty,
|
||||
.dirty_folio = f2fs_dirty_node_folio,
|
||||
.invalidate_folio = f2fs_invalidate_folio,
|
||||
.releasepage = f2fs_release_page,
|
||||
#ifdef CONFIG_MIGRATION
|
||||
|
Loading…
Reference in New Issue
Block a user