aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim2016-06-01 20:55:51 -0700
committerJaegeuk Kim2016-06-02 18:05:06 -0700
commit1c4bf763039ccdc6dab9e1c3cf84a1cb14c6ff13 (patch)
treee9a5304525fa24a87062bc9d8c05c115c4dc0bd7 /fs
parent4340fa55298d17049e71c7a34e04647379c269f3 (diff)
Revert "f2fs: no need inc dirty pages under inode lock"
This reverts commit b951a4ec165af4973b2bd9c80fb5845fbd840435. Conflicts: fs/f2fs/checkpoint.c
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/checkpoint.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 389160049993..5cf7238f4f89 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -793,13 +793,12 @@ void update_dirty_page(struct inode *inode, struct page *page)
!S_ISLNK(inode->i_mode))
return;
- if (type != FILE_INODE || test_opt(sbi, DATA_FLUSH)) {
- spin_lock(&sbi->inode_lock[type]);
+ spin_lock(&sbi->inode_lock[type]);
+ if (type != FILE_INODE || test_opt(sbi, DATA_FLUSH))
__add_dirty_inode(inode, type);
- spin_unlock(&sbi->inode_lock[type]);
- }
-
inode_inc_dirty_pages(inode);
+ spin_unlock(&sbi->inode_lock[type]);
+
SetPagePrivate(page);
f2fs_trace_pid(page);
}