Patchwork [3/4] ext4: remove unused argument in mb_find_extent

login
register
mail settings
Submitter Robin Dong
Date Sept. 15, 2011, 7:09 a.m.
Message ID <1316070580-10723-3-git-send-email-hao.bigrat@gmail.com>
Download mbox | patch
Permalink /patch/114764/
State Accepted
Headers show

Comments

Robin Dong - Sept. 15, 2011, 7:09 a.m.
From: Robin Dong <sanbai@taobao.com>

The argument 'ord' in function mb_find_extent is redundant,
so remove it.

Signed-off-by: Robin Dong <sanbai@taobao.com>
---
 fs/ext4/mballoc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Theodore Ts'o - Oct. 26, 2011, 9:34 a.m.
On Thu, Sep 15, 2011 at 03:09:39PM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai@taobao.com>
> 
> The argument 'ord' in function mb_find_extent is redundant,
> so remove it.
> 
> Signed-off-by: Robin Dong <sanbai@taobao.com>

Thanks, applied.

In both this and the previous patch, I changed "argument" to
"variable" for clarity/correctness in the git commit log.

	       			      	  - 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

Patch

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index d0fc76e..99d123a 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1390,7 +1390,6 @@  static int mb_find_extent(struct ext4_buddy *e4b, int order, int block,
 {
 	int next = block;
 	int max;
-	int ord;
 	void *buddy;
 
 	assert_spin_locked(ext4_group_lock_ptr(e4b->bd_sb, e4b->bd_group));
@@ -1432,9 +1431,8 @@  static int mb_find_extent(struct ext4_buddy *e4b, int order, int block,
 		if (mb_test_bit(next, EXT4_MB_BITMAP(e4b)))
 			break;
 
-		ord = mb_find_order_for_block(e4b, next);
+		order = mb_find_order_for_block(e4b, next);
 
-		order = ord;
 		block = next >> order;
 		ex->fe_len += 1 << order;
 	}