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]
Date:   Mon, 26 Apr 2021 14:15:44 +0800
From:   Joseph Qi <jiangqi903@...il.com>
To:     riteshh <riteshh@...ux.ibm.com>,
        Joseph Qi <joseph.qi@...ux.alibaba.com>
Cc:     tytso@....edu, adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: remove redundant check buffer_uptodate()



On 4/26/21 1:05 PM, riteshh wrote:
> On 21/04/26 11:23AM, Joseph Qi wrote:
>> Now set_buffer_uptodate() will test first and then set, so we don't have
>> to check buffer_uptodate() first, remove it to simplify code.
> 
> Maybe we can change below function as well then.
> No need to check same thing twice since set_buffer_uptodate() is already doing
> the check.
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index b258e8279266..856bd9981409 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -3749,7 +3749,7 @@ static inline int ext4_buffer_uptodate(struct buffer_head *bh)
>          * have to read the block because we may read the old data
>          * successfully.
>          */
> -       if (!buffer_uptodate(bh) && buffer_write_io_error(bh))
> +       if (buffer_write_io_error(bh))
>                 set_buffer_uptodate(bh);
>         return buffer_uptodate(bh);
>  }
> 
> With that pls feel free to add:
> Reviewed-by: Ritesh Harjani <riteshh@...ux.ibm.com>
> 

Sure, will send v2 with above addressed.

Thanks,
Joseph

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ