ext4: clean up feature test macros with predicate functions
Create separate predicate functions to test/set/clear feature flags, thereby replacing the wordy old macros. Furthermore, clean out the places where we open-coded feature tests. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Theodore Ts'o

parent
6a797d2737
commit
e2b911c535
@@ -3055,7 +3055,7 @@ void ext4_ext_init(struct super_block *sb)
|
||||
* possible initialization would be here
|
||||
*/
|
||||
|
||||
if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
|
||||
if (ext4_has_feature_extents(sb)) {
|
||||
#if defined(AGGRESSIVE_TEST) || defined(CHECK_BINSEARCH) || defined(EXTENTS_STATS)
|
||||
printk(KERN_INFO "EXT4-fs: file extents enabled"
|
||||
#ifdef AGGRESSIVE_TEST
|
||||
@@ -3082,7 +3082,7 @@ void ext4_ext_init(struct super_block *sb)
|
||||
*/
|
||||
void ext4_ext_release(struct super_block *sb)
|
||||
{
|
||||
if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
|
||||
if (!ext4_has_feature_extents(sb))
|
||||
return;
|
||||
|
||||
#ifdef EXTENTS_STATS
|
||||
|
Reference in New Issue
Block a user