]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/f2fs/segment.c
f2fs: clean up f2fs_balance_fs
[mirror_ubuntu-zesty-kernel.git] / fs / f2fs / segment.c
index a3474bad57702863822be2e2da5d0eae09194b39..c7bbc915d962725b5c4dd0d48f81c1be361023b3 100644 (file)
@@ -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.