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, 19 Apr 2013 07:15:02 +0200
From:	Jan Kara <jack@...e.cz>
To:	Lukas Czerner <lczerner@...hat.com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [PATCH v3 15/18] ext4: remove unused code from
 ext4_remove_blocks()

On Tue 09-04-13 11:14:24, Lukas Czerner wrote:
> The "head removal" branch in the condition is never used in any code
> path in ext4 since the function only caller ext4_ext_rm_leaf() will make
> sure that the extent is properly split before removing blocks. Note that
> there is a bug in this branch anyway.
> 
> This commit removes the unused code completely and makes use of
> ext4_error() instead of printk if dubious range is provided.
> 
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>
  Looks good. You can add:
Reviewed-by: Jan Kara <jack@...e.cz>

								Honza
> ---
>  fs/ext4/extents.c |   21 ++++-----------------
>  1 files changed, 4 insertions(+), 17 deletions(-)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 6c5a70a..4adaa8a 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -2435,23 +2435,10 @@ static int ext4_remove_blocks(handle_t *handle, struct inode *inode,
>  			*partial_cluster = EXT4_B2C(sbi, pblk);
>  		else
>  			*partial_cluster = 0;
> -	} else if (from == le32_to_cpu(ex->ee_block)
> -		   && to <= le32_to_cpu(ex->ee_block) + ee_len - 1) {
> -		/* head removal */
> -		ext4_lblk_t num;
> -		ext4_fsblk_t start;
> -
> -		num = to - from;
> -		start = ext4_ext_pblock(ex);
> -
> -		ext_debug("free first %u blocks starting %llu\n", num, start);
> -		ext4_free_blocks(handle, inode, NULL, start, num, flags);
> -
> -	} else {
> -		printk(KERN_INFO "strange request: removal(2) "
> -				"%u-%u from %u:%u\n",
> -				from, to, le32_to_cpu(ex->ee_block), ee_len);
> -	}
> +	} else
> +		ext4_error(sbi->s_sb, "strange request: removal(2) "
> +			   "%u-%u from %u:%u\n",
> +			   from, to, le32_to_cpu(ex->ee_block), ee_len);
>  	return 0;
>  }
>  
> -- 
> 1.7.7.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" 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