All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: Fix mount failure with quota configured as module
@ 2020-02-21 10:08 Jan Kara
  2020-02-21 18:56 ` Theodore Y. Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2020-02-21 10:08 UTC (permalink / raw)
  To: Ted Tso; +Cc: linux-ext4, Jan Kara

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 <jack@suse.cz>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index f464dff09774..576b69d2ca41 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3009,7 +3009,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,
-- 
2.16.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext4: Fix mount failure with quota configured as module
  2020-02-21 10:08 [PATCH] ext4: Fix mount failure with quota configured as module Jan Kara
@ 2020-02-21 18:56 ` Theodore Y. Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Y. Ts'o @ 2020-02-21 18:56 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-ext4

On Fri, Feb 21, 2020 at 11:08:35AM +0100, Jan Kara wrote:
> 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 <jack@suse.cz>

Whoops, good catch.  Thanks, applied.

					- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-21 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 10:08 [PATCH] ext4: Fix mount failure with quota configured as module Jan Kara
2020-02-21 18:56 ` Theodore Y. Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.