2009-12-14 13:55:46

by David Howells

[permalink] [raw]
Subject: [PATCH] Ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured

Don't offer to build ext2/3 support into ext4 if ext4 itself is not configured
on.

Signed-off-by: David Howells <[email protected]>
---

fs/ext4/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig
index 9acf7e8..c48a6bc 100644
--- a/fs/ext4/Kconfig
+++ b/fs/ext4/Kconfig
@@ -28,7 +28,7 @@ config EXT4_FS

config EXT4_USE_FOR_EXT23
bool "Use ext4 for ext2/ext3 file systems"
- depends on EXT3_FS=n || EXT2_FS=n
+ depends on EXT4_FS && (EXT3_FS=n || EXT2_FS=n)
default y
help
Allow the ext4 file system driver code to be used for ext2 or


2009-12-14 14:30:20

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] Ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured

On Mon, Dec 14, 2009 at 01:55:46PM +0000, David Howells wrote:
> Don't offer to build ext2/3 support into ext4 if ext4 itself is not configured
> on.
>
> Signed-off-by: David Howells <[email protected]>

Whoops, nice catch. Added to the ext4 patch queue, I'll make sure
this gets pushed to Linus during the merge window.

- Ted

2009-12-14 18:10:41

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH] Ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured



On Mon, 14 Dec 2009, David Howells wrote:
> config EXT4_USE_FOR_EXT23
> bool "Use ext4 for ext2/ext3 file systems"
> - depends on EXT3_FS=n || EXT2_FS=n
> + depends on EXT4_FS && (EXT3_FS=n || EXT2_FS=n)

Side note: I think we should actively avoid complex config dependency
expressions.

The above can be written with simpler expressions by just splitting it in
two, and I think it makes it more readable:

depends on EXT4_FS
depends on EXT3_FS=n || EXT2_FS=n

since the two expressions are logically totally unrelated: one is just the
obvious "this kconfig doesn't make sense without ext4" thing that was
missing before, and the other is a totally unrelated "if you already have
selected ext2 and ext3, then you clearly don't want ext4 to deal with
them".

Linus