Patchwork [v2] ext4: delete a no useful sentence

login
register
mail settings
Submitter Liu Haibo
Date June 21, 2012, 6:31 p.m.
Message ID <1340303466-7967-1-git-send-email-HaiboLiu6@gmail.com>
Download mbox | patch
Permalink /patch/166373/
State Accepted
Headers show

Comments

Liu Haibo - June 21, 2012, 6:31 p.m.
From: Haibo Liu <HaiboLiu6@gmai.com>

In this patch, the sentence "poff = block % blocks_per_page"
in ext4_mb_get_buddy_page_lock has no effect.
So we should delete it to save cpu.

v1->v2: update the patch subject and the patch comment.

Signed-off-by: Haibo Liu <HaiboLiu6@gmail.com>
---
 fs/ext4/mballoc.c |    1 -
 1 file changed, 1 deletion(-)
Theodore Ts'o - July 9, 2012, 2:25 p.m.
On Thu, Jun 21, 2012 at 08:31:06AM -0000, Liu Haibo wrote:
> From: Haibo Liu <HaiboLiu6@gmai.com>
> 
> In this patch, the sentence "poff = block % blocks_per_page"
> in ext4_mb_get_buddy_page_lock has no effect.
> So we should delete it to save cpu.
> 
> v1->v2: update the patch subject and the patch comment.
> 
> Signed-off-by: Haibo Liu <HaiboLiu6@gmail.com>

Applied, thanks.  BTW, I modified the patch description a little to
note that the compiler would optimize out the statement, but it's
better to remove unused C statements.

       	  	 				- 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..7223bd4 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1016,7 +1016,6 @@  static int ext4_mb_get_buddy_page_lock(struct super_block *sb,
 
 	block++;
 	pnum = block / blocks_per_page;
-	poff = block % blocks_per_page;
 	page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
 	if (!page)
 		return -EIO;