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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230619095615.pr6dw773bsruwqar@quack3>
Date:   Mon, 19 Jun 2023 11:56:15 +0200
From:   Jan Kara <jack@...e.cz>
To:     Bean Huo <beanhuo@...pp.de>
Cc:     viro@...iv.linux.org.uk, brauner@...nel.org,
        akpm@...ux-foundation.org, jack@...e.cz, jack@...e.com,
        tytso@....edu, adilger.kernel@...ger.ca, mark@...heh.com,
        jlbec@...lplan.org, joseph.qi@...ux.alibaba.com,
        linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, ocfs2-devel@....oracle.com,
        beanhuo@...ron.com
Subject: Re: [PATCH v1 3/5] ext4: No need to check return value of
 block_commit_write()

On Sun 18-06-23 23:32:48, Bean Huo wrote:
> From: Bean Huo <beanhuo@...ron.com>
> 
> Remove unnecessary check on the return value of block_commit_write().
> 
> Signed-off-by: Bean Huo <beanhuo@...ron.com>

Looks good to me. Feel free to add:

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

								Honza

> ---
>  fs/ext4/move_extent.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
> index b5af2fc03b2f..f4b4861a74ee 100644
> --- a/fs/ext4/move_extent.c
> +++ b/fs/ext4/move_extent.c
> @@ -392,14 +392,11 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode,
>  	for (i = 0; i < block_len_in_page; i++) {
>  		*err = ext4_get_block(orig_inode, orig_blk_offset + i, bh, 0);
>  		if (*err < 0)
> -			break;
> +			goto repair_branches;
>  		bh = bh->b_this_page;
>  	}
> -	if (!*err)
> -		*err = block_commit_write(&folio[0]->page, from, from + replaced_size);
>  
> -	if (unlikely(*err < 0))
> -		goto repair_branches;
> +	block_commit_write(&folio[0]->page, from, from + replaced_size);
>  
>  	/* Even in case of data=writeback it is reasonable to pin
>  	 * inode to transaction, to prevent unexpected data loss */
> -- 
> 2.34.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ