lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Dec 2023 15:38:25 +0100
From: Jan Kara <jack@...e.cz>
To: Zhihao Cheng <chengzhihao1@...wei.com>
Cc: tytso@....edu, jack@...e.com, linux-ext4@...r.kernel.org,
	yi.zhang@...wei.com
Subject: Re: [PATCH 5/5] ext4: Move ext4_check_bdev_write_error() into
 nojournal mode

On Fri 03-11-23 22:52:50, Zhihao Cheng wrote:
> Since JBD2 takes care of all metadata writeback errors of fs dev,
> ext4_check_bdev_write_error() is useful only in nojournal mode.
> Move it into '!ext4_handle_valid(handle)' branch.
> 
> Signed-off-by: Zhihao Cheng <chengzhihao1@...wei.com>
> Suggested-by: Jan Kara <jack@...e.cz>

Looks good. Feel free to add:

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

								Honza


> ---
>  fs/ext4/ext4_jbd2.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
> index d1a2e6624401..5d8055161acd 100644
> --- a/fs/ext4/ext4_jbd2.c
> +++ b/fs/ext4/ext4_jbd2.c
> @@ -235,8 +235,6 @@ int __ext4_journal_get_write_access(const char *where, unsigned int line,
>  
>  	might_sleep();
>  
> -	ext4_check_bdev_write_error(sb);
> -
>  	if (ext4_handle_valid(handle)) {
>  		err = jbd2_journal_get_write_access(handle, bh);
>  		if (err) {
> @@ -244,7 +242,8 @@ int __ext4_journal_get_write_access(const char *where, unsigned int line,
>  						  handle, err);
>  			return err;
>  		}
> -	}
> +	} else
> +		ext4_check_bdev_write_error(sb);
>  	if (trigger_type == EXT4_JTR_NONE || !ext4_has_metadata_csum(sb))
>  		return 0;
>  	BUG_ON(trigger_type >= EXT4_JOURNAL_TRIGGER_COUNT);
> -- 
> 2.39.2
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ