diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-05-26 13:03:35 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-31 21:31:52 +0300 |
commit | aec2f729fca13661e9bc651839ae23bf8367195a (patch) | |
tree | 802657785438ea1c5c529c716bcf0872d3935414 /fs/f2fs/node.c | |
parent | 64c74a7ab505ea40d1b3e5d02735ecab08ae1b14 (diff) | |
download | linux-aec2f729fca13661e9bc651839ae23bf8367195a.tar.xz |
f2fs: clean up with clear_radix_tree_dirty_tag
Introduce clear_radix_tree_dirty_tag to include common codes for cleanup.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 67b3e89975af..59041acbf7ac 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -102,18 +102,10 @@ bool available_free_memory(struct f2fs_sb_info *sbi, int type) static void clear_node_page_dirty(struct page *page) { - struct address_space *mapping = page->mapping; - unsigned int long flags; - if (PageDirty(page)) { - xa_lock_irqsave(&mapping->i_pages, flags); - radix_tree_tag_clear(&mapping->i_pages, - page_index(page), - PAGECACHE_TAG_DIRTY); - xa_unlock_irqrestore(&mapping->i_pages, flags); - + clear_radix_tree_dirty_tag(page); clear_page_dirty_for_io(page); - dec_page_count(F2FS_M_SB(mapping), F2FS_DIRTY_NODES); + dec_page_count(F2FS_P_SB(page), F2FS_DIRTY_NODES); } ClearPageUptodate(page); } |