Patchwork ext4: Don't increase s_mb_buddies_generated in ext4_mb_release.

login
register
mail settings
Submitter Tao Ma
Date July 17, 2011, 3:11 p.m.
Message ID <1310915483-2906-2-git-send-email-tm@tao.ma>
Download mbox | patch
Permalink /patch/105072/
State Accepted
Headers show

Comments

Tao Ma - July 17, 2011, 3:11 p.m.
From: Tao Ma <boyu.mt@taobao.com>

In ext4_mb_release, we use s_mb_buddies_generated++. Although
the output is OK, but I don't think we need this extra ++.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
 fs/ext4/mballoc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Theodore Ts'o - July 23, 2011, 8:20 p.m.
On Sun, Jul 17, 2011 at 11:11:22PM +0800, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
> 
> In ext4_mb_release, we use s_mb_buddies_generated++. Although
> the output is OK, but I don't think we need this extra ++.
> 
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>

Thanks, added to the ext4 tree.

					- 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 e7749b7..f56a592 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2568,7 +2568,7 @@  int ext4_mb_release(struct super_block *sb)
 				atomic_read(&sbi->s_mb_lost_chunks));
 		printk(KERN_INFO
 		       "EXT4-fs: mballoc: %lu generated and it took %Lu\n",
-				sbi->s_mb_buddies_generated++,
+				sbi->s_mb_buddies_generated,
 				sbi->s_mb_generation_time);
 		printk(KERN_INFO
 		       "EXT4-fs: mballoc: %u preallocated, %u discarded\n",