f2fs: no need inc dirty pages under inode lock
authorYunlei He <heyunlei@huawei.com>
Fri, 13 May 2016 06:57:43 +0000 (14:57 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 16 May 2016 22:32:01 +0000 (15:32 -0700)
No need inc dirty pages under inode lock

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c

index 6402e9372f6c498d81153bbe170f350caaf93a0e..3da6499a9e8276d1623e99c5496d122149ab7378 100644 (file)
@@ -787,9 +787,9 @@ void update_dirty_page(struct inode *inode, struct page *page)
 
        spin_lock(&sbi->inode_lock[type]);
        __add_dirty_inode(inode, type);
-       inode_inc_dirty_pages(inode);
        spin_unlock(&sbi->inode_lock[type]);
 
+       inode_inc_dirty_pages(inode);
        SetPagePrivate(page);
        f2fs_trace_pid(page);
 }