aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r--fs/f2fs/inode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 9ab81e7472c5..7f8569bd8759 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -221,9 +221,6 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc)
221 if (!is_inode_flag_set(F2FS_I(inode), FI_DIRTY_INODE)) 221 if (!is_inode_flag_set(F2FS_I(inode), FI_DIRTY_INODE))
222 return 0; 222 return 0;
223 223
224 if (wbc)
225 f2fs_balance_fs(sbi);
226
227 /* 224 /*
228 * We need to lock here to prevent from producing dirty node pages 225 * We need to lock here to prevent from producing dirty node pages
229 * during the urgent cleaning time when runing out of free sections. 226 * 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)
231 ilock = mutex_lock_op(sbi); 228 ilock = mutex_lock_op(sbi);
232 ret = update_inode_page(inode); 229 ret = update_inode_page(inode);
233 mutex_unlock_op(sbi, ilock); 230 mutex_unlock_op(sbi, ilock);
231
232 if (wbc)
233 f2fs_balance_fs(sbi);
234
234 return ret; 235 return ret;
235} 236}
236 237