diff options
| author | Chao Yu <yuchao0@huawei.com> | 2016-10-11 22:57:02 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:34:15 +0200 |
| commit | 1cd44ce61c549e7a3de82383a51be4568bb67b0b (patch) | |
| tree | f756c0811b1112413b676f257364799ac0346814 | |
| parent | ab9b10421e8f2ad6ac5986c8219d57dd4b2526e0 (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 <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5a184f322..ffea096da 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1240,6 +1240,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; |
