|
@@ -221,9 +221,6 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
|
|
if (!is_inode_flag_set(F2FS_I(inode), FI_DIRTY_INODE))
|
|
|
return 0;
|
|
|
|
|
|
- if (wbc)
|
|
|
- f2fs_balance_fs(sbi);
|
|
|
-
|
|
|
/*
|
|
|
* We need to lock here to prevent from producing dirty node pages
|
|
|
* during the urgent cleaning time when runing out of free sections.
|
|
@@ -231,6 +228,10 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
|
|
ilock = mutex_lock_op(sbi);
|
|
|
ret = update_inode_page(inode);
|
|
|
mutex_unlock_op(sbi, ilock);
|
|
|
+
|
|
|
+ if (wbc)
|
|
|
+ f2fs_balance_fs(sbi);
|
|
|
+
|
|
|
return ret;
|
|
|
}
|
|
|
|