diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-10-10 00:19:53 +0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-11-04 03:07:29 +0300 |
commit | 34ba94bac938be14ffe2a639a4688b81a37d0f58 (patch) | |
tree | b679b836ce5bb3deeb2953e1795bae138c2f3c97 /fs/f2fs/data.c | |
parent | f4ca536f71ad69d9a974d0156d43b24b3f3112de (diff) | |
download | linux-34ba94bac938be14ffe2a639a4688b81a37d0f58.tar.xz |
f2fs: do not make dirty any inmemory pages
This patch let inmemory pages be clean all the time.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 8e58c4cc2cb9..84f20e932499 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1052,10 +1052,7 @@ static int f2fs_write_end(struct file *file, trace_f2fs_write_end(inode, pos, len, copied); - if (f2fs_is_atomic_file(inode) || f2fs_is_volatile_file(inode)) - register_inmem_page(inode, page); - else - set_page_dirty(page); + set_page_dirty(page); if (pos + copied > i_size_read(inode)) { i_size_write(inode, pos + copied); @@ -1138,6 +1135,12 @@ static int f2fs_set_data_page_dirty(struct page *page) trace_f2fs_set_page_dirty(page, DATA); SetPageUptodate(page); + + if (f2fs_is_atomic_file(inode) || f2fs_is_volatile_file(inode)) { + register_inmem_page(inode, page); + return 1; + } + mark_inode_dirty(inode); if (!PageDirty(page)) { |