summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorChao Yu2018-10-07 13:06:15 +0200
committerJaegeuk Kim2018-10-23 02:54:47 +0200
commit9149a5eb606152df158eb7d7da5a34e84b574189 (patch)
tree03ccd0b0bb30026f81c7e13257291d35c28ca0ad /fs/f2fs/namei.c
parentf2fs: fix to spread clear_cold_data() (diff)
downloadkernel-qcow2-linux-9149a5eb606152df158eb7d7da5a34e84b574189.tar.gz
kernel-qcow2-linux-9149a5eb606152df158eb7d7da5a34e84b574189.tar.xz
kernel-qcow2-linux-9149a5eb606152df158eb7d7da5a34e84b574189.zip
f2fs: spread f2fs_set_inode_flags()
This patch changes codes as below: - use f2fs_set_inode_flags() to update i_flags atomically to avoid potential race. - synchronize F2FS_I(inode)->i_flags to inode->i_flags in f2fs_new_inode(). - use f2fs_set_inode_flags() to simply codes in f2fs_quota_{on,off}. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index a54577e417b1..54295b5c1822 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -122,6 +122,8 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
if (F2FS_I(inode)->i_flags & F2FS_PROJINHERIT_FL)
set_inode_flag(inode, FI_PROJ_INHERIT);
+ f2fs_set_inode_flags(inode);
+
trace_f2fs_new_inode(inode, 0);
return inode;