Patchwork ext4: cleanup in ext4_discard_allocated_blocks()

login
register
mail settings
Submitter Zheng Liu
Date Feb. 26, 2012, 3:54 p.m.
Message ID <1330271677-10200-1-git-send-email-wenqing.lz@taobao.com>
Download mbox | patch
Permalink /patch/143096/
State Accepted
Headers show

Comments

Zheng Liu - Feb. 26, 2012, 3:54 p.m.
remove 'len' variable in ext4_discard_allocated_blocks() because it is useless.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 fs/ext4/mballoc.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
Theodore Ts'o - May 28, 2012, 9:54 p.m.
On Sun, Feb 26, 2012 at 11:54:37PM +0800, Zheng Liu wrote:
> remove 'len' variable in ext4_discard_allocated_blocks() because it is useless.
> 
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>

Thanks, applied.

					- 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 cb990b2..8f8889f 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3123,12 +3123,9 @@  static void ext4_mb_collect_stats(struct ext4_allocation_context *ac)
 static void ext4_discard_allocated_blocks(struct ext4_allocation_context *ac)
 {
 	struct ext4_prealloc_space *pa = ac->ac_pa;
-	int len;
 
-	if (pa && pa->pa_type == MB_INODE_PA) {
-		len = ac->ac_b_ex.fe_len;
-		pa->pa_free += len;
-	}
+	if (pa && pa->pa_type == MB_INODE_PA)
+		pa->pa_free += ac->ac_b_ex.fe_len;
 
 }