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: <61f32d13-3e39-afcb-752f-90740c765a65@kernel.org>
Date:   Thu, 2 Nov 2017 21:57:41 +0800
From:   Chao Yu <chao@...nel.org>
To:     Fan Li <fanofcode.li@...sung.com>,
        'Jaegeuk Kim' <jaegeuk@...nel.org>
Cc:     linux-kernel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: save a multiplication for last_nid
 calculation

On 2017/11/2 11:02, Fan Li wrote:
> Use a slightly easier way to calculate last_nid.
> 
> Signed-off-by: Fan li <fanofcode.li@...sung.com>

Reviewed-by: Chao Yu <yuchao0@...wei.com>

Thanks,

> ---
>  fs/f2fs/node.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index 7834097..55ab330 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -2642,7 +2642,7 @@ static inline void load_free_nid_bitmap(struct f2fs_sb_info *sbi)
>                 __set_bit_le(i, nm_i->nat_block_bitmap);
> 
>                 nid = i * NAT_ENTRY_PER_BLOCK;
> -               last_nid = (i + 1) * NAT_ENTRY_PER_BLOCK;
> +               last_nid = nid + NAT_ENTRY_PER_BLOCK;
> 
>                 spin_lock(&NM_I(sbi)->nid_list_lock);
>                 for (; nid < last_nid; nid++)
> --
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ