diff mbox

[1/2] ext4: teach resize report old blocks count correctly

Message ID 1328065291-13607-1-git-send-email-xiaoqiangnk@gmail.com
State Accepted, archived
Headers show

Commit Message

Yongqiang Yang Feb. 1, 2012, 3:01 a.m. UTC
o_blocks_count should not be changed, becasuse it is used later when
reporting old blocks count in debug mode.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/resize.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Yongqiang Yang May 10, 2012, 1:15 p.m. UTC | #1
ping?

The 2nd patch of the series fixes a bug which I meet again when
testing 64bit feature.


Yongqiang.

On Wed, Feb 1, 2012 at 11:01 AM, Yongqiang Yang <xiaoqiangnk@gmail.com> wrote:
> o_blocks_count should not be changed, becasuse it is used later when
> reporting old blocks count in debug mode.
>
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
> ---
>  fs/ext4/resize.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
> index 59fa0be..601fea1 100644
> --- a/fs/ext4/resize.c
> +++ b/fs/ext4/resize.c
> @@ -1654,8 +1654,7 @@ int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count)
>            es->s_log_groups_per_flex)
>                flexbg_size = 1 << es->s_log_groups_per_flex;
>
> -       o_blocks_count = ext4_blocks_count(es);
> -       if (o_blocks_count == n_blocks_count)
> +       if (ext4_blocks_count(es) == n_blocks_count)
>                goto out;
>
>        flex_gd = alloc_flex_gd(flexbg_size);
> --
> 1.7.5.1
>
diff mbox

Patch

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 59fa0be..601fea1 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1654,8 +1654,7 @@  int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count)
 	    es->s_log_groups_per_flex)
 		flexbg_size = 1 << es->s_log_groups_per_flex;
 
-	o_blocks_count = ext4_blocks_count(es);
-	if (o_blocks_count == n_blocks_count)
+	if (ext4_blocks_count(es) == n_blocks_count)
 		goto out;
 
 	flex_gd = alloc_flex_gd(flexbg_size);