blob: cd1b76736eeaf814662f1e68a8d29bbb71ce2ad0 [file] [log] [blame]
From 5d522dd13c89ce774c948520fa6802b89c6e19ab Mon Sep 17 00:00:00 2001
From: Jan Kara <>
Date: Fri, 21 Feb 2020 11:08:35 +0100
Subject: [PATCH] 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.
Fixes: d65d87a07476 ("ext4: improve explanation of a mount failure caused by a misconfigured kernel")
Signed-off-by: Jan Kara <>
Signed-off-by: Theodore Ts'o <>
Signed-off-by: Paul Gortmaker <>
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4de59cb75369..93c098bec738 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2975,7 +2975,7 @@ static int ext4_feature_set_ok(struct super_block *sb, int readonly)
return 0;
-#if !defined(CONFIG_QUOTA) || !defined(CONFIG_QFMT_V2)
if (!readonly && (ext4_has_feature_quota(sb) ||
ext4_has_feature_project(sb))) {
ext4_msg(sb, KERN_ERR,