Skip to contentSkip to conversation

ext4: remove unnecessary selections from EXT3_FS

PATCH Applied Eric Biggers 3 participants 3 messages Dec 26, 2019 – Jan 13, 2020 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: remove unnecessary selections from EXT3_FS

From: Eric Biggers <[email protected]>

Since EXT3_FS already selects EXT4_FS, there's no reason for it to redundantly select all the selections of EXT4_FS -- notwithstanding the comments that claim otherwise.

Remove these redundant selections to avoid confusion.

---
 fs/ext4/Kconfig | 6 ------
 1 file changed, 6 deletions(-)
fs/ext4/Kconfig +0 -6
index ef42ab040905..5841fd8aa706 100644
@@ -4,12 +4,7 @@
 # kernels after the removal of ext3 driver.
 config EXT3_FS
 	tristate "The Extended 3 (ext3) filesystem"
-	# These must match EXT4_FS selects...
 	select EXT4_FS
-	select JBD2
-	select CRC16
-	select CRYPTO
-	select CRYPTO_CRC32C
 	help
 	  This config option is here only for backward compatibility. ext3
 	  filesystem is now handled by the ext4 driver.
@@ -33,7 +28,6 @@ config EXT3_FS_SECURITY
 
 config EXT4_FS
 	tristate "The Extended 4 (ext4) filesystem"
-	# Please update EXT3_FS selects when changing these
 	select JBD2
 	select CRC16
 	select CRYPTO
Signature · 1 line
2.24.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Eric Biggers

From: Eric Biggers <[email protected]>

Since EXT3_FS already selects EXT4_FS, there's no reason for it to redundantly select all the selections of EXT4_FS -- notwithstanding the comments that claim otherwise.

Remove these redundant selections to avoid confusion.

Interesting. I was always thinking that 'select' is not recursive - at least that's how I was interpretting the note in kconfig-language.rs:

Note:
select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set.
In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over.

But when experimenting with it now, I agree that these additional selects don't seem to be needed in ext3 config. So probably the paragraph just references to the fact that 'depends on' dependencies are not checked for 'select'. All in all this is a long way to say:

:)
Honza

Quoted 32 lines
---
 fs/ext4/Kconfig | 6 ------
 1 file changed, 6 deletions(-)
fs/ext4/Kconfig +0 -6
index ef42ab040905..5841fd8aa706 100644
@@ -4,12 +4,7 @@
 # kernels after the removal of ext3 driver.
 config EXT3_FS
 	tristate "The Extended 3 (ext3) filesystem"
-	# These must match EXT4_FS selects...
 	select EXT4_FS
-	select JBD2
-	select CRC16
-	select CRYPTO
-	select CRYPTO_CRC32C
 	help
 	  This config option is here only for backward compatibility. ext3
 	  filesystem is now handled by the ext4 driver.
@@ -33,7 +28,6 @@ config EXT3_FS_SECURITY
 
 config EXT4_FS
 	tristate "The Extended 4 (ext4) filesystem"
-	# Please update EXT3_FS selects when changing these
 	select JBD2
 	select CRC16
 	select CRYPTO
Signature · 1 line
2.24.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR