diff options
author | Jan Kara <jack@suse.cz> | 2020-02-21 11:08:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-28 16:36:13 +0100 |
commit | 77ed838c16339be8ecb98e0da9b50b892820336c (patch) | |
tree | 7d3078159d89f3d876b5c8ea7247a57ad9584cf1 /fs | |
parent | 6538b08e720d93a92c2dcb1215e761db248931c9 (diff) | |
download | linux-stable-77ed838c16339be8ecb98e0da9b50b892820336c.tar.gz linux-stable-77ed838c16339be8ecb98e0da9b50b892820336c.tar.bz2 linux-stable-77ed838c16339be8ecb98e0da9b50b892820336c.zip |
ext4: fix mount failure with quota configured as module
commit 9db176bceb5c5df4990486709da386edadc6bd1d upstream.
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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 5b9e7377f26e..8ce6b741cc5a 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2863,7 +2863,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, |