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] [day] [month] [year] [list]
Message-ID: <20140221090809.GA12506@quack.suse.cz>
Date:	Fri, 21 Feb 2014 10:08:09 +0100
From:	Jan Kara <jack@...e.cz>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Jan Kara <jack@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] ext3: remove unneeded check in ext3_ordered_writepage()

On Fri 21-02-14 11:58:54, Dan Carpenter wrote:
> We already know "ret" is zero so there is no need to do:
> 
> 		if (!ret)
> 			ret = err;
> 
> We can just assign ret directly instead.
  Thanks. I've added the patch to my tree.

								Honza

> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
> index 384b6ebb655f..491f022c476a 100644
> --- a/fs/ext3/inode.c
> +++ b/fs/ext3/inode.c
> @@ -1673,12 +1673,9 @@ static int ext3_ordered_writepage(struct page *page,
>  	 * block_write_full_page() succeeded.  Otherwise they are unmapped,
>  	 * and generally junk.
>  	 */
> -	if (ret == 0) {
> -		err = walk_page_buffers(handle, page_bufs, 0, PAGE_CACHE_SIZE,
> +	if (ret == 0)
> +		ret = walk_page_buffers(handle, page_bufs, 0, PAGE_CACHE_SIZE,
>  					NULL, journal_dirty_data_fn);
> -		if (!ret)
> -			ret = err;
> -	}
>  	walk_page_buffers(handle, page_bufs, 0,
>  			PAGE_CACHE_SIZE, NULL, bput_one);
>  	err = ext3_journal_stop(handle);
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ