Skip to content

Commit

Permalink
f2fs: remove F2FS_SET_FEATURE() and F2FS_CLEAR_FEATURE() macro
Browse files Browse the repository at this point in the history
F2FS_SET_FEATURE() and F2FS_CLEAR_FEATURE() have never
been used since they were introduced by this commit
76f105a("f2fs: add feature facility in superblock").

So let's remove them. BTW, convert f2fs_sb_has_##name to return bool.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Yangtao Li authored and Jaegeuk Kim committed Dec 12, 2022
1 parent 870af77 commit e480751
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ struct f2fs_mount_info {
#define __F2FS_HAS_FEATURE(raw_super, mask) \
((raw_super->feature & cpu_to_le32(mask)) != 0)
#define F2FS_HAS_FEATURE(sbi, mask) __F2FS_HAS_FEATURE(sbi->raw_super, mask)
#define F2FS_SET_FEATURE(sbi, mask) \
(sbi->raw_super->feature |= cpu_to_le32(mask))
#define F2FS_CLEAR_FEATURE(sbi, mask) \
(sbi->raw_super->feature &= ~cpu_to_le32(mask))

/*
* Default values for user and/or group using reserved blocks
Expand Down Expand Up @@ -4387,7 +4383,7 @@ static inline bool f2fs_disable_compressed_file(struct inode *inode)
}

#define F2FS_FEATURE_FUNCS(name, flagname) \
static inline int f2fs_sb_has_##name(struct f2fs_sb_info *sbi) \
static inline bool f2fs_sb_has_##name(struct f2fs_sb_info *sbi) \
{ \
return F2FS_HAS_FEATURE(sbi, F2FS_FEATURE_##flagname); \
}
Expand Down

0 comments on commit e480751

Please sign in to comment.