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: <20220201113525.dwgdblhb4wb75ugv@quack3.lan>
Date:   Tue, 1 Feb 2022 12:35:25 +0100
From:   Jan Kara <jack@...e.cz>
To:     Ritesh Harjani <riteshh@...ux.ibm.com>
Cc:     linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Theodore Ts'o <tytso@....edu>, Jan Kara <jack@...e.cz>,
        Harshad Shirwadkar <harshadshirwadkar@...il.com>
Subject: Re: [RFC 3/6] ext4: Use in_range() for range checking in
 ext4_fc_replay_check_excluded

On Mon 31-01-22 20:46:52, Ritesh Harjani wrote:
> Instead of open coding it, use in_range() function instead.
> 
> Signed-off-by: Ritesh Harjani <riteshh@...ux.ibm.com>

Looks good. Feel free to add:

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

								Honza

> ---
>  fs/ext4/fast_commit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
> index 5934c23e153e..bd6a47d18716 100644
> --- a/fs/ext4/fast_commit.c
> +++ b/fs/ext4/fast_commit.c
> @@ -1874,8 +1874,8 @@ bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t blk)
>  		if (state->fc_regions[i].ino == 0 ||
>  			state->fc_regions[i].len == 0)
>  			continue;
> -		if (blk >= state->fc_regions[i].pblk &&
> -		    blk < state->fc_regions[i].pblk + state->fc_regions[i].len)
> +		if (in_range(blk, state->fc_regions[i].pblk,
> +					state->fc_regions[i].len))
>  			return true;
>  	}
>  	return false;
> -- 
> 2.31.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ