Skip to content
Commit 8abfb36a authored by Zhang Zhen's avatar Zhang Zhen Committed by Jaegeuk Kim
Browse files

f2fs: atomically set inode->i_flags in f2fs_set_inode_flags()



Use set_mask_bits() to atomically set i_flags instead of clearing out the
S_IMMUTABLE, S_APPEND, etc. flags and then setting them from the
FS_IMMUTABLE_FL, FS_APPEND_FL, etc. flags, since this opens up a race
where an immutable file has the immutable flag cleared for a brief
window of time.

Signed-off-by: default avatarZhang Zhen <zhenzhang.zhang@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent b156d542
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment