aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-11-06 20:21:24 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2014-11-10 09:51:28 -0500
commit2f97c326bf05ca2feeb95688da50c68671638b69 (patch)
tree9d87b4a9549afa1a42dd602bea08e8cc13d1a8ba /fs/f2fs/node.c
parente5e7ea3c86e56b725e4076e8dc583378abad7697 (diff)
f2fs: write node pages if checkpoint is not doing
It needs to write node pages if checkpoint is not doing in order to avoid memory pressure. Reviewed-by: Changman Lee <cm224.lee@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 4ea2c4728156..6f514fb5fd96 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1314,10 +1314,12 @@ static int f2fs_write_node_page(struct page *page,
1314 return 0; 1314 return 0;
1315 } 1315 }
1316 1316
1317 if (wbc->for_reclaim) 1317 if (wbc->for_reclaim) {
1318 goto redirty_out; 1318 if (!down_read_trylock(&sbi->node_write))
1319 1319 goto redirty_out;
1320 down_read(&sbi->node_write); 1320 } else {
1321 down_read(&sbi->node_write);
1322 }
1321 set_page_writeback(page); 1323 set_page_writeback(page);
1322 write_node_page(sbi, page, &fio, nid, ni.blk_addr, &new_addr); 1324 write_node_page(sbi, page, &fio, nid, ni.blk_addr, &new_addr);
1323 set_node_addr(sbi, &ni, new_addr, is_fsync_dnode(page)); 1325 set_node_addr(sbi, &ni, new_addr, is_fsync_dnode(page));