Patchwork [1/3] e2fsck: remove last argument from e2fsck_discard_blocks()

login
register
mail settings
Submitter Theodore Ts'o
Date March 11, 2012, 7:33 p.m.
Message ID <1331494393-21577-1-git-send-email-tytso@mit.edu>
Download mbox | patch
Permalink /patch/146003/
State Accepted
Headers show

Comments

Theodore Ts'o - March 11, 2012, 7:33 p.m.
From: Lukas Czerner <lczerner@redhat.com>

Simple code cleanup.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 e2fsck/pass5.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Lukas Czerner - March 12, 2012, 7:30 a.m.
On Sun, 11 Mar 2012, Theodore Ts'o wrote:

> From: Lukas Czerner <lczerner@redhat.com>
> 
> Simple code cleanup.
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Looks good. Thanks!
-Lukas

> ---
>  e2fsck/pass5.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
> index 9a6a4b0..ca438cb 100644
> --- a/e2fsck/pass5.c
> +++ b/e2fsck/pass5.c
> @@ -74,8 +74,8 @@ void e2fsck_pass5(e2fsck_t ctx)
>  	print_resource_track(ctx, _("Pass 5"), &rtrack, ctx->fs->io);
>  }
>  
> -static void e2fsck_discard_blocks(e2fsck_t ctx, io_manager manager,
> -				  blk64_t start, blk64_t count)
> +static void e2fsck_discard_blocks(e2fsck_t ctx, blk64_t start,
> +				  blk64_t count)
>  {
>  	ext2_filsys fs = ctx->fs;
>  
> @@ -85,7 +85,7 @@ static void e2fsck_discard_blocks(e2fsck_t ctx, io_manager manager,
>  	 * not enough to fix the problem, hence it is not safe to run discard
>  	 * in this case.
>  	 */
> -	if (ext2fs_test_changed(ctx->fs))
> +	if (ext2fs_test_changed(fs))
>  		ctx->options &= ~E2F_OPT_DISCARD;
>  
>  	if (!(ctx->options & E2F_OPT_NO) &&
> @@ -137,7 +137,7 @@ static void e2fsck_discard_inodes(e2fsck_t ctx, int group,
>  	num = count / EXT2_INODES_PER_BLOCK(fs->super);
>  
>  	if (num > 0)
> -		e2fsck_discard_blocks(ctx, fs->io->manager, blk, num);
> +		e2fsck_discard_blocks(ctx, blk, num);
>  }
>  
>  #define NO_BLK ((blk64_t) -1)
> @@ -379,7 +379,7 @@ redo_counts:
>  				first_free = i;
>  		} else {
>  			if (i > first_free)
> -				e2fsck_discard_blocks(ctx, manager, first_free,
> +				e2fsck_discard_blocks(ctx, first_free,
>  						      (i - first_free));
>  			first_free = ext2fs_blocks_count(fs->super);
>  		}
>

Patch

diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index 9a6a4b0..ca438cb 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -74,8 +74,8 @@  void e2fsck_pass5(e2fsck_t ctx)
 	print_resource_track(ctx, _("Pass 5"), &rtrack, ctx->fs->io);
 }
 
-static void e2fsck_discard_blocks(e2fsck_t ctx, io_manager manager,
-				  blk64_t start, blk64_t count)
+static void e2fsck_discard_blocks(e2fsck_t ctx, blk64_t start,
+				  blk64_t count)
 {
 	ext2_filsys fs = ctx->fs;
 
@@ -85,7 +85,7 @@  static void e2fsck_discard_blocks(e2fsck_t ctx, io_manager manager,
 	 * not enough to fix the problem, hence it is not safe to run discard
 	 * in this case.
 	 */
-	if (ext2fs_test_changed(ctx->fs))
+	if (ext2fs_test_changed(fs))
 		ctx->options &= ~E2F_OPT_DISCARD;
 
 	if (!(ctx->options & E2F_OPT_NO) &&
@@ -137,7 +137,7 @@  static void e2fsck_discard_inodes(e2fsck_t ctx, int group,
 	num = count / EXT2_INODES_PER_BLOCK(fs->super);
 
 	if (num > 0)
-		e2fsck_discard_blocks(ctx, fs->io->manager, blk, num);
+		e2fsck_discard_blocks(ctx, blk, num);
 }
 
 #define NO_BLK ((blk64_t) -1)
@@ -379,7 +379,7 @@  redo_counts:
 				first_free = i;
 		} else {
 			if (i > first_free)
-				e2fsck_discard_blocks(ctx, manager, first_free,
+				e2fsck_discard_blocks(ctx, first_free,
 						      (i - first_free));
 			first_free = ext2fs_blocks_count(fs->super);
 		}