summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-02-05 17:44:29 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-02-11 17:04:44 -0800
commit487261f39bcd8983f55c611e299f70f34659674b (patch)
treece3b804b5fe36470bfc782e707b9215c7e5e13ea /fs/f2fs/node.c
parentd24bdcbfc694026b5cc283cddf47e38f5a7b685d (diff)
downloadlinux-487261f39bcd8983f55c611e299f70f34659674b.tar.gz
linux-487261f39bcd8983f55c611e299f70f34659674b.tar.bz2
linux-487261f39bcd8983f55c611e299f70f34659674b.zip
f2fs: merge {invalidate,release}page for meta/node/data pages
This patch merges ->{invalidate,release}page function for meta/node/data pages. After this, duplication of codes could be removed. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 9feda386ed80..ea22c3210c8a 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1370,25 +1370,6 @@ static int f2fs_set_node_page_dirty(struct page *page)
return 0;
}
-static void f2fs_invalidate_node_page(struct page *page, unsigned int offset,
- unsigned int length)
-{
- struct inode *inode = page->mapping->host;
- if (PageDirty(page))
- dec_page_count(F2FS_I_SB(inode), F2FS_DIRTY_NODES);
- ClearPagePrivate(page);
-}
-
-static int f2fs_release_node_page(struct page *page, gfp_t wait)
-{
- /* If this is dirty page, keep PagePrivate */
- if (PageDirty(page))
- return 0;
-
- ClearPagePrivate(page);
- return 1;
-}
-
/*
* Structure of the f2fs node operations
*/
@@ -1396,8 +1377,8 @@ 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,
- .invalidatepage = f2fs_invalidate_node_page,
- .releasepage = f2fs_release_node_page,
+ .invalidatepage = f2fs_invalidate_page,
+ .releasepage = f2fs_release_page,
};
static struct free_nid *__lookup_free_nid_list(struct f2fs_nm_info *nm_i,