diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-10-07 14:06:15 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-10-23 03:54:47 +0300 |
commit | 9149a5eb606152df158eb7d7da5a34e84b574189 (patch) | |
tree | 03ccd0b0bb30026f81c7e13257291d35c28ca0ad /fs/f2fs/f2fs.h | |
parent | 2baf07818549c8bb8d7b3437e889b86eab56d38e (diff) | |
download | linux-9149a5eb606152df158eb7d7da5a34e84b574189.tar.xz |
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/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 7f9cb0bba104..c25c67868b98 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3422,7 +3422,7 @@ static inline void f2fs_set_encrypted_inode(struct inode *inode) { #ifdef CONFIG_F2FS_FS_ENCRYPTION file_set_encrypt(inode); - inode->i_flags |= S_ENCRYPTED; + f2fs_set_inode_flags(inode); #endif } |