You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
f2fs: introduce f2fs_change_bit to simplify the change bit logic
Introduce f2fs_change_bit to simplify the change bit logic in
function set_to_next_nat{sit}.
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -1073,6 +1073,15 @@ static inline int f2fs_clear_bit(unsigned int nr, char *addr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void f2fs_change_bit(unsigned int nr, char *addr)
|
||||
{
|
||||
int mask;
|
||||
|
||||
addr += (nr >> 3);
|
||||
mask = 1 << (7 - (nr & 0x07));
|
||||
*addr ^= mask;
|
||||
}
|
||||
|
||||
/* used for f2fs_inode_info->flags */
|
||||
enum {
|
||||
FI_NEW_INODE, /* indicate newly allocated inode */
|
||||
|
||||
Reference in New Issue
Block a user