Ext2: remove the static function release_blocks to optimize the kernel
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.
Signed-off-by Wang Shilong <[email protected]>
---fs/ext2/balloc.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
fs/ext2/balloc.c +0 -0
@@ -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);
- }
-}