diff mbox

[2/3] ext4: get rid of code duplication

Message ID 1411455752-2332-2-git-send-email-dmonakhov@openvz.org
State Accepted, archived
Headers show

Commit Message

Dmitry Monakhov Sept. 23, 2014, 7:02 a.m. UTC
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 fs/ext4/mballoc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Jan Kara Sept. 23, 2014, 9:54 a.m. UTC | #1
On Tue 23-09-14 11:02:31, Dmitry Monakhov wrote:
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
  Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/mballoc.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 65cca28..eab825f 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -3155,9 +3155,8 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
>  			 "start %lu, size %lu, fe_logical %lu",
>  			 (unsigned long) start, (unsigned long) size,
>  			 (unsigned long) ac->ac_o_ex.fe_logical);
> +		BUG();
>  	}
> -	BUG_ON(start + size <= ac->ac_o_ex.fe_logical &&
> -			start > ac->ac_o_ex.fe_logical);
>  	BUG_ON(size <= 0 || size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb));
>  
>  	/* now prepare goal request */
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o Oct. 2, 2014, 2:27 a.m. UTC | #2
On Tue, Sep 23, 2014 at 11:54:37AM +0200, Jan Kara wrote:
> On Tue 23-09-14 11:02:31, Dmitry Monakhov wrote:
> > 
> > Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
>   Looks good. You can add:
> Reviewed-by: Jan Kara <jack@suse.cz>

Applied, thanks.

	 				- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 65cca28..eab825f 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3155,9 +3155,8 @@  ext4_mb_normalize_request(struct ext4_allocation_context *ac,
 			 "start %lu, size %lu, fe_logical %lu",
 			 (unsigned long) start, (unsigned long) size,
 			 (unsigned long) ac->ac_o_ex.fe_logical);
+		BUG();
 	}
-	BUG_ON(start + size <= ac->ac_o_ex.fe_logical &&
-			start > ac->ac_o_ex.fe_logical);
 	BUG_ON(size <= 0 || size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb));
 
 	/* now prepare goal request */