All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH] e2fsprogs: remove misleading argument from ext2fs_bg_flags_clear
Date: Wed, 02 Sep 2009 16:43:00 -0500	[thread overview]
Message-ID: <4A9EE6E4.2000307@redhat.com> (raw)

ext2fs_bg_flags_clear shouldn't take an unused bg_flags argument
if its purpose is to clear -all- flags.  That just makes people
like me call it for the wrong purpose ;)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Index: e2fsprogs/lib/ext2fs/blknum.c
===================================================================
--- e2fsprogs.orig/lib/ext2fs/blknum.c
+++ e2fsprogs/lib/ext2fs/blknum.c
@@ -435,9 +435,9 @@ void ext2fs_bg_flags_set(ext2_filsys fs,
 }
 
 /*
- * Clear the flags for this block group
+ * Clear all flags for this block group
  */
-void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flags)
+void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group)
 {
 	if (fs->super->s_desc_size >= EXT2_MIN_DESC_SIZE_64BIT) {
 		struct ext4_group_desc *gdp;
Index: e2fsprogs/lib/ext2fs/csum.c
===================================================================
--- e2fsprogs.orig/lib/ext2fs/csum.c
+++ e2fsprogs/lib/ext2fs/csum.c
@@ -204,7 +204,7 @@ int main(int argc, char **argv)
 		fs->group_desc[i].bg_free_blocks_count = 31119;
 		fs->group_desc[i].bg_free_inodes_count = 15701;
 		fs->group_desc[i].bg_used_dirs_count = 2;
-		ext2fs_bg_flags_clear(fs, i, 0);
+		ext2fs_bg_flags_clear(fs, i);
 	};
 
 	csum1 = ext2fs_group_desc_csum(fs, 0);
Index: e2fsprogs/resize/resize2fs.c
===================================================================
--- e2fsprogs.orig/resize/resize2fs.c
+++ e2fsprogs/resize/resize2fs.c
@@ -495,7 +495,7 @@ retry:
 		       sizeof(struct ext2_group_desc));
 		adjblocks = 0;
 
-		ext2fs_bg_flags_clear(fs, i, 0);
+		ext2fs_bg_flags_clear(fs, i);
 		if (csum_flag)
 			ext2fs_bg_flag_set(fs, i, EXT2_BG_INODE_UNINIT | EXT2_BG_INODE_ZEROED)
 				;
Index: e2fsprogs/lib/ext2fs/ext2fs.h
===================================================================
--- e2fsprogs.orig/lib/ext2fs/ext2fs.h
+++ e2fsprogs/lib/ext2fs/ext2fs.h
@@ -777,8 +777,7 @@ extern void ext2fs_bg_itable_unused_set(
 				     blk64_t blk);
 extern __u16 ext2fs_bg_flags(ext2_filsys fs, dgrp_t group);
 extern void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
-extern void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group,
-				  __u16 bg_flags);
+extern void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group);
 extern int ext2fs_bg_flag_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
 extern void ext2fs_bg_flag_set(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
 extern void ext2fs_bg_flag_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flag);


             reply	other threads:[~2009-09-02 21:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 21:43 Eric Sandeen [this message]
2009-09-02 23:28 ` [PATCH] e2fsprogs: remove misleading argument from ext2fs_bg_flags_clear Andreas Dilger
2009-09-02 23:42   ` Theodore Tso
2009-09-03  3:00     ` Eric Sandeen
2009-09-03  5:12       ` Andreas Dilger
2009-09-03  5:13         ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9EE6E4.2000307@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.