diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-01-30 11:39:08 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-02-11 17:04:42 -0800 |
commit | f68daeebba5a697f31f64c07b8693fa678981819 (patch) | |
tree | 4bb5e72c52204887e0c219f4240c775d2251191a /fs/f2fs/checkpoint.c | |
parent | 081d78c2fc4ab2fef4cdf1100dd22155c73f8657 (diff) | |
download | op-kernel-dev-f68daeebba5a697f31f64c07b8693fa678981819.zip op-kernel-dev-f68daeebba5a697f31f64c07b8693fa678981819.tar.gz |
f2fs: keep PagePrivate during releasepage
If PagePrivate is removed by releasepage, f2fs loses counting dirty pages.
e.g., try_to_release_page will not release page when the page is dirty,
but our releasepage removes PagePrivate.
[<ffffffff81188d75>] try_to_release_page+0x35/0x50
[<ffffffff811996f9>] invalidate_inode_pages2_range+0x2f9/0x3b0
[<ffffffffa02a7f54>] ? truncate_blocks+0x384/0x4d0 [f2fs]
[<ffffffffa02b7583>] ? f2fs_direct_IO+0x283/0x290 [f2fs]
[<ffffffffa02b7fb0>] ? get_data_block_fiemap+0x20/0x20 [f2fs]
[<ffffffff8118aa53>] generic_file_direct_write+0x163/0x170
[<ffffffff8118ad06>] __generic_file_write_iter+0x2a6/0x350
[<ffffffff8118adef>] generic_file_write_iter+0x3f/0xb0
[<ffffffff81203081>] new_sync_write+0x81/0xb0
[<ffffffff81203837>] vfs_write+0xb7/0x1f0
[<ffffffff81204459>] SyS_write+0x49/0xb0
[<ffffffff817c286d>] system_call_fastpath+0x16/0x1b
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index f7cdcad..470fa58 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -321,6 +321,10 @@ static void f2fs_invalidate_meta_page(struct page *page, unsigned int offset, static int f2fs_release_meta_page(struct page *page, gfp_t wait) { + /* If this is dirty page, keep PagePrivate */ + if (PageDirty(page)) + return 0; + ClearPagePrivate(page); return 1; } |