]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
f2fs: no need to lock for update_inode_page all the time
authorJaegeuk Kim <jaegeuk@kernel.org>
Sat, 12 Sep 2015 18:25:30 +0000 (11:25 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 9 Oct 2015 23:20:50 +0000 (16:20 -0700)
As comment says, we don't need to call f2fs_lock_op in write_inode to prevent
from producing dirty node pages all the time.
That happens only when there is not enough free sections and we can avoid that
by calling balance_fs in prior to that.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/inode.c

index 35aae65b3e5db64748c72d09efd0a03a4a867bfb..97e20decacb4e17677fc3c43cfb5d45a6ab290bc 100644 (file)
@@ -296,16 +296,12 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc)
                return 0;
 
        /*
-        * We need to lock here to prevent from producing dirty node pages
+        * We need to balance fs here to prevent from producing dirty node pages
         * during the urgent cleaning time when runing out of free sections.
         */
-       f2fs_lock_op(sbi);
        update_inode_page(inode);
-       f2fs_unlock_op(sbi);
-
-       if (wbc)
-               f2fs_balance_fs(sbi);
 
+       f2fs_balance_fs(sbi);
        return 0;
 }