diff mbox series

ext4: remove unnecessary selections from EXT3_FS

Message ID 20191226153920.4466-1-ebiggers@kernel.org
State Accepted
Headers show
Series ext4: remove unnecessary selections from EXT3_FS | expand

Commit Message

Eric Biggers Dec. 26, 2019, 3:39 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

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.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/ext4/Kconfig | 6 ------
 1 file changed, 6 deletions(-)

Comments

Jan Kara Jan. 9, 2020, 10:19 a.m. UTC | #1
On Thu 26-12-19 09:39:20, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> 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.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

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:

Reviewed-by: Jan Kara <jack@suse.cz>

:)
								Honza

> ---
>  fs/ext4/Kconfig | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig
> index ef42ab040905..5841fd8aa706 100644
> --- a/fs/ext4/Kconfig
> +++ b/fs/ext4/Kconfig
> @@ -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
> -- 
> 2.24.1
>
Theodore Ts'o Jan. 13, 2020, 7:17 p.m. UTC | #2
On Thu, Dec 26, 2019 at 09:39:20AM -0600, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> 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.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Applied, thanks.

					- Ted
diff mbox series

Patch

diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig
index ef42ab040905..5841fd8aa706 100644
--- a/fs/ext4/Kconfig
+++ b/fs/ext4/Kconfig
@@ -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