Commit 58f7e00f authored by Yufen Yu's avatar Yufen Yu Committed by Jaegeuk Kim

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: default avatarYufen Yu <yuyufen@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 567c4bf5
...@@ -2656,7 +2656,7 @@ static inline void __mark_inode_dirty_flag(struct inode *inode, ...@@ -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) 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); __mark_inode_dirty_flag(inode, flag, true);
} }
...@@ -2667,7 +2667,7 @@ static inline int is_inode_flag_set(struct inode *inode, int flag) ...@@ -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) 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); __mark_inode_dirty_flag(inode, flag, false);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment