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]
Date:	Fri, 2 Mar 2012 11:42:11 +0100
From:	Jan Kara <jack@...e.cz>
To:	Lukas Czerner <lczerner@...hat.com>
Cc:	linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH 2/2] ext3: don't forget to discard last block in a group

On Thu 01-03-12 14:40:07, Lukas Czerner wrote:
> Currently we might omit to discard the last block in the group (max)
> because of off-by-one condition error. This commit fixes the condition
> so we always discard the whole range if possible.
  I think this is actually caused by your previous patch because before it,
max would be end_block+1 despite its name. So just fold this patch into the
previous one please.

								Honza
> 
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>
> ---
>  fs/ext3/balloc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
> index e3a8d9e..997da27 100644
> --- a/fs/ext3/balloc.c
> +++ b/fs/ext3/balloc.c
> @@ -1970,7 +1970,7 @@ static ext3_grpblk_t ext3_trim_all_free(struct super_block *sb,
>  	sbi = EXT3_SB(sb);
>  
>  	 /* Walk through the whole group */
> -	while (start < max) {
> +	while (start <= max) {
>  		start = bitmap_search_next_usable_block(start, bitmap_bh, max);
>  		if (start < 0)
>  			break;
> @@ -1980,7 +1980,7 @@ static ext3_grpblk_t ext3_trim_all_free(struct super_block *sb,
>  		 * Allocate contiguous free extents by setting bits in the
>  		 * block bitmap
>  		 */
> -		while (next < max
> +		while (next <= max
>  			&& claim_block(sb_bgl_lock(sbi, group),
>  					next, bitmap_bh)) {
>  			next++;
> -- 
> 1.7.4.4
> 
> --
> 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
-- 
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