Skip to contentSkip to conversation

ext4: delete a no useful sentence

PATCH Applied Haibo 2 participants 2 messages Jun 21, 2012 – Jul 9, 2012 ext4 file system

lore
Share & tools
lore

Haibo

author
#0 lore raw

PATCH v2 1/1 ext4: delete a no useful sentence

From: Haibo Liu <[email protected]>

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.

---
 fs/ext4/mballoc.c |    1 -
 1 file changed, 1 deletion(-)
fs/ext4/mballoc.c +0 -1
index cb990b2..7223bd4 100644
@@ -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;
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 9 lines · Liu Haibo

From: Haibo Liu <[email protected]>

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.

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