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]
Message-ID: <e3322360-6085-b050-8b5c-1467da26d0af@huaweicloud.com>
Date: Wed, 31 Jul 2024 11:30:39 +0800
From: Zhang Yi <yi.zhang@...weicloud.com>
To: Kemeng Shi <shikemeng@...weicloud.com>, tytso@....edu, jack@...e.com
Cc: linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] jbd2: remove dead check in journal_alloc_journal_head

On 2024/7/30 19:33, Kemeng Shi wrote:
> We will alloc journal_head with __GFP_NOFAIL anyway, test for failure
> is pointless.
> 
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>

A nice cleanup.

Reviewed-by: Zhang Yi <yi.zhang@...wei.com>

> ---
>  fs/jbd2/journal.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index da5a56d700f1..b5d02de1ffff 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -2866,8 +2866,7 @@ static struct journal_head *journal_alloc_journal_head(void)
>  		ret = kmem_cache_zalloc(jbd2_journal_head_cache,
>  				GFP_NOFS | __GFP_NOFAIL);
>  	}
> -	if (ret)
> -		spin_lock_init(&ret->b_state_lock);
> +	spin_lock_init(&ret->b_state_lock);
>  	return ret;
>  }
>  
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ