linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: cleanup in ext4_discard_allocated_blocks()
@ 2012-02-26 15:54 Zheng Liu
  2012-05-28 21:54 ` Ted Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Liu @ 2012-02-26 15:54 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, Zheng Liu

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(-)

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;
 
 }
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext4: cleanup in ext4_discard_allocated_blocks()
  2012-02-26 15:54 [PATCH] ext4: cleanup in ext4_discard_allocated_blocks() Zheng Liu
@ 2012-05-28 21:54 ` Ted Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Ts'o @ 2012-05-28 21:54 UTC (permalink / raw)
  To: Zheng Liu; +Cc: linux-ext4, Zheng Liu

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-28 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-26 15:54 [PATCH] ext4: cleanup in ext4_discard_allocated_blocks() Zheng Liu
2012-05-28 21:54 ` Ted Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).