summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inode.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-09-12 20:25:30 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2015-10-10 01:20:50 +0200
commitc5cd29d21cebc2e1802a9eea4cd940ddf9825ce1 (patch)
treec3c4da9068126a4b41cdd05b14bce6fcf1d2c4ef /fs/f2fs/inode.c
parentf2fs: cover number of dirty node pages under node_write lock (diff)
downloadlinux-c5cd29d21cebc2e1802a9eea4cd940ddf9825ce1.tar.xz
linux-c5cd29d21cebc2e1802a9eea4cd940ddf9825ce1.zip
f2fs: no need to lock for update_inode_page all the time
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>
Diffstat (limited to '')
-rw-r--r--fs/f2fs/inode.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 35aae65b3e5d..97e20decacb4 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -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;
}