aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu <[email protected]>2016-10-11 22:57:02 +0800
committerJaegeuk Kim <[email protected]>2016-11-23 12:10:52 -0800
commit9434fcde1fa0f48e1a29fbdd9d436fa279aeb909 (patch)
tree71f44d4e4b98e757178535e9de64546cc3227a74
parent933439c8f3474e329709b715b43b0b8168bbecf8 (diff)
f2fs: add missing f2fs_balance_fs in f2fs_zero_range
f2fs_balance_fs should be called in between node page updating, otherwise node page count will exceeded far beyond watermark of triggering foreground garbage collection, result in facing high risk of hitting LFS allocation failure. Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
-rw-r--r--fs/f2fs/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 02372175725d..578bc7bcaa13 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1218,6 +1218,9 @@ static int f2fs_zero_range(struct inode *inode, loff_t offset, loff_t len,
ret = f2fs_do_zero_range(&dn, index, end);
f2fs_put_dnode(&dn);
f2fs_unlock_op(sbi);
+
+ f2fs_balance_fs(sbi, dn.node_changed);
+
if (ret)
goto out;