]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ext4: fix mount failure with quota configured as module
authorJan Kara <jack@suse.cz>
Fri, 21 Feb 2020 10:08:35 +0000 (11:08 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 22 Feb 2020 00:32:07 +0000 (19:32 -0500)
When CONFIG_QFMT_V2 is configured as a module, the test in
ext4_feature_set_ok() fails and so mount of filesystems with quota or
project features fails. Fix the test to use IS_ENABLED macro which
works properly even for modules.

Link: https://lore.kernel.org/r/20200221100835.9332-1-jack@suse.cz
Fixes: d65d87a07476 ("ext4: improve explanation of a mount failure caused by a misconfigured kernel")
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/super.c

index 6928fc229799d9210661c1761ea0cb100db1b591..ff1b764b0c0ed818628b9c29cc1b6fd06df9b26c 100644 (file)
@@ -3034,7 +3034,7 @@ static int ext4_feature_set_ok(struct super_block *sb, int readonly)
                return 0;
        }
 
-#if !defined(CONFIG_QUOTA) || !defined(CONFIG_QFMT_V2)
+#if !IS_ENABLED(CONFIG_QUOTA) || !IS_ENABLED(CONFIG_QFMT_V2)
        if (!readonly && (ext4_has_feature_quota(sb) ||
                          ext4_has_feature_project(sb))) {
                ext4_msg(sb, KERN_ERR,