Skip to contentSkip to conversation

Ext2: remove the static function release_blocks to optimize the kernel

PATCH In review Wang Shilong 1 participant 1 message Feb 6, 2013 ext2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Ext2: remove the static function release_blocks to optimize the kernel

From: Wang Shilong <[email protected]>

Because the static function 'release_blocks' is only called when releasing blocks,it will be more simple and efficient to call the function 'percpu_counter_add' directly.

---
fs/ext2/balloc.c | 11 +----------

1 file changed, 1 insertion(+), 10 deletions(-)
fs/ext2/balloc.c +0 -0
index 9d372bf..d5a6afd 100644
@@ -159,15 +159,6 @@ read_block_bitmap(struct super_block *sb, unsigned int block_group)

return bh;
}

-static void release_blocks(struct super_block *sb, int count) -{
- if (count) {
- struct ext2_sb_info *sbi = EXT2_SB(sb);
-
- percpu_counter_add(&sbi->s_freeblocks_counter, count);
- }
-}