diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-07 14:15:04 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-08 11:45:23 -0800 |
commit | 2c4db1a6f6b42e2a9fb611cbbeb71a3a9a358ee0 (patch) | |
tree | c61e7933ca50c9f69d54adc216e6384a186e3082 /fs/f2fs/segment.c | |
parent | 2a4b8e9fab9cea45d90179d9ee8e718c5ed26457 (diff) | |
download | blackbird-op-linux-2c4db1a6f6b42e2a9fb611cbbeb71a3a9a358ee0.tar.gz blackbird-op-linux-2c4db1a6f6b42e2a9fb611cbbeb71a3a9a358ee0.zip |
f2fs: clean up f2fs_balance_fs
This patch adds one parameter to clean up all the callers of f2fs_balance_fs.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index a3474bad5770..c7bbc915d962 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -213,7 +213,7 @@ int commit_inmem_pages(struct inode *inode, bool abort) * inode becomes free by iget_locked in f2fs_iget. */ if (!abort) { - f2fs_balance_fs(sbi); + f2fs_balance_fs(sbi, true); f2fs_lock_op(sbi); } @@ -262,8 +262,10 @@ int commit_inmem_pages(struct inode *inode, bool abort) * This function balances dirty node and dentry pages. * In addition, it controls garbage collection. */ -void f2fs_balance_fs(struct f2fs_sb_info *sbi) +void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need) { + if (!need) + return; /* * We should do GC or end up with checkpoint, if there are so many dirty * dir/node pages without enough free segments. |