diff options
author | Yufen Yu <yuyufen@huawei.com> | 2020-07-31 02:18:13 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-08-03 18:05:10 -0700 |
commit | 58f7e00ffb45a4115ba701a32467c2aeb944c855 (patch) | |
tree | 301fcfd16648b6dc96ca1f9ec0e4155db482707d /fs/f2fs | |
parent | 567c4bf54a85a14af4ca9be19d7dc327e56a15f9 (diff) | |
download | lwn-58f7e00ffb45a4115ba701a32467c2aeb944c855.tar.gz lwn-58f7e00ffb45a4115ba701a32467c2aeb944c855.zip |
f2fs: replace test_and_set/clear_bit() with set/clear_bit()
Since set/clear_inode_flag() don't need to return value to show
if flag is set, we can just call set/clear_bit() here.
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/f2fs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 3a14056c9cd8..16322ea5b463 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2656,7 +2656,7 @@ static inline void __mark_inode_dirty_flag(struct inode *inode, static inline void set_inode_flag(struct inode *inode, int flag) { - test_and_set_bit(flag, F2FS_I(inode)->flags); + set_bit(flag, F2FS_I(inode)->flags); __mark_inode_dirty_flag(inode, flag, true); } @@ -2667,7 +2667,7 @@ static inline int is_inode_flag_set(struct inode *inode, int flag) static inline void clear_inode_flag(struct inode *inode, int flag) { - test_and_clear_bit(flag, F2FS_I(inode)->flags); + clear_bit(flag, F2FS_I(inode)->flags); __mark_inode_dirty_flag(inode, flag, false); } |