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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4548041a-9614-4ddb-8a07-b87cfc66b743@huawei.com>
Date: Wed, 13 Nov 2024 17:01:35 +0800
From: Zhang Yi <yi.zhang@...wei.com>
To: Jinliang Zheng <alexjlzheng@...il.com>, <tytso@....edu>
CC: <adilger.kernel@...ger.ca>, <linux-ext4@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, Jinliang Zheng <alexjlzheng@...cent.com>
Subject: Re: [PATCH] ext4: remove duplicate check for EXT4_FC_REPLAY

On 2024/11/13 12:41, Jinliang Zheng wrote:
> EXT4_FC_REPLAY will be checked in ext4_es_lookup_extent(). If it is
> set, ext4_es_lookup_extent() will return 0.
> 
> Remove the repeated check for EXT4_FC_REPLAY in ext4_map_blocks()
> to simplify the code.
> 
> Signed-off-by: Jinliang Zheng <alexjlzheng@...cent.com>

It makes sense to me, thanks for the cleanup.

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

> ---
>  fs/ext4/inode.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 89aade6f45f6..999f947c13d2 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -619,8 +619,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
>  		return -EFSCORRUPTED;
>  
>  	/* Lookup extent status tree firstly */
> -	if (!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) &&
> -	    ext4_es_lookup_extent(inode, map->m_lblk, NULL, &es)) {
> +	if (ext4_es_lookup_extent(inode, map->m_lblk, NULL, &es)) {
>  		if (ext4_es_is_written(&es) || ext4_es_is_unwritten(&es)) {
>  			map->m_pblk = ext4_es_pblock(&es) +
>  					map->m_lblk - es.es_lblk;


Powered by blists - more mailing lists