diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-01 12:02:51 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-12 10:30:41 -0700 |
commit | 7f3037a5ec0672e03f96d4b0b86169c4c48e479e (patch) | |
tree | 66b71b995cbd04ccfa395f6ac487c6204c03b32a /fs/f2fs/data.c | |
parent | ed214a11830a12a83511eb32415e71f1a0760b8a (diff) | |
download | linux-stable-7f3037a5ec0672e03f96d4b0b86169c4c48e479e.tar.gz linux-stable-7f3037a5ec0672e03f96d4b0b86169c4c48e479e.tar.bz2 linux-stable-7f3037a5ec0672e03f96d4b0b86169c4c48e479e.zip |
f2fs: check free_sections for defragmentation
Fix wrong condition check for defragmentation of a file.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 8ffb480935b3..357a4235dde8 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1293,7 +1293,7 @@ write: if (!wbc->for_reclaim) need_balance_fs = true; - else if (has_not_enough_free_secs(sbi, 0)) + else if (has_not_enough_free_secs(sbi, 0, 0)) goto redirty_out; err = -EAGAIN; @@ -1625,7 +1625,7 @@ repeat: if (err) goto fail; - if (need_balance && has_not_enough_free_secs(sbi, 0)) { + if (need_balance && has_not_enough_free_secs(sbi, 0, 0)) { unlock_page(page); f2fs_balance_fs(sbi, true); lock_page(page); |