diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-01 22:02:51 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-12 20:30:41 +0300 |
commit | 7f3037a5ec0672e03f96d4b0b86169c4c48e479e (patch) | |
tree | 66b71b995cbd04ccfa395f6ac487c6204c03b32a /fs/f2fs/file.c | |
parent | ed214a11830a12a83511eb32415e71f1a0760b8a (diff) | |
download | linux-7f3037a5ec0672e03f96d4b0b86169c4c48e479e.tar.xz |
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/file.c')
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 3b62949dfb07..b8a521f6c2d5 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1961,7 +1961,7 @@ static int f2fs_defragment_range(struct f2fs_sb_info *sbi, * avoid defragment running in SSR mode when free section are allocated * intensively */ - if (has_not_enough_free_secs(sbi, sec_num)) { + if (has_not_enough_free_secs(sbi, 0, sec_num)) { err = -EAGAIN; goto out; } |