]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: support iflag change given the mask
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 6 May 2021 19:11:14 +0000 (12:11 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 11 May 2021 21:48:11 +0000 (14:48 -0700)
commit34a7f9e7ac904293b2fae57a20d09b810a3da267
tree11d2e91b7b412cb451633aa46416767840d0fb17
parent1d409e62bf0fcbc20afa5f430fd43ba128b65cdf
f2fs: support iflag change given the mask

In f2fs_fileattr_set(),

if (!fa->flags_valid)
mask &= FS_COMMON_FL;

In this case, we can set supported flags by mask only instead of BUG_ON.

/* Flags shared betwen flags/xflags */
(FS_SYNC_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | \
 FS_NODUMP_FL | FS_NOATIME_FL | FS_DAX_FL | \
 FS_PROJINHERIT_FL)

Fixes: e4be685cbc9e ("f2fs: convert to fileattr")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c