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: <20230619095642.vjb5fjyhgnbp2drc@quack3>
Date:   Mon, 19 Jun 2023 11:56:42 +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 5/5] udf: No need to check return value of
 block_commit_write()

On Sun 18-06-23 23:32:50, 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/udf/file.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/udf/file.c b/fs/udf/file.c
> index 8238f742377b..b1a062922a24 100644
> --- a/fs/udf/file.c
> +++ b/fs/udf/file.c
> @@ -67,13 +67,13 @@ static vm_fault_t udf_page_mkwrite(struct vm_fault *vmf)
>  	else
>  		end = PAGE_SIZE;
>  	err = __block_write_begin(page, 0, end, udf_get_block);
> -	if (!err)
> -		err = block_commit_write(page, 0, end);
> -	if (err < 0) {
> +	if (err) {
>  		unlock_page(page);
>  		ret = block_page_mkwrite_return(err);
>  		goto out_unlock;
>  	}
> +
> +	block_commit_write(page, 0, end);
>  out_dirty:
>  	set_page_dirty(page);
>  	wait_for_stable_page(page);
> -- 
> 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