diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2014-11-20 12:19:11 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-11-20 12:19:11 -0500 |
commit | b93b41d4c7338dda9304eaac9d3b40da43198806 (patch) | |
tree | dc6800d429d0dbdee0a45a24e7fe79a06799eb50 /fs/ext4/super.c | |
parent | 88c6b61ff1cfb4013a3523227d91ad11b2892388 (diff) |
ext4: kill ext4_kvfree()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 2c9e6864abd9..4b79f39ebf66 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -176,15 +176,6 @@ void *ext4_kvzalloc(size_t size, gfp_t flags) | |||
176 | return ret; | 176 | return ret; |
177 | } | 177 | } |
178 | 178 | ||
179 | void ext4_kvfree(void *ptr) | ||
180 | { | ||
181 | if (is_vmalloc_addr(ptr)) | ||
182 | vfree(ptr); | ||
183 | else | ||
184 | kfree(ptr); | ||
185 | |||
186 | } | ||
187 | |||
188 | ext4_fsblk_t ext4_block_bitmap(struct super_block *sb, | 179 | ext4_fsblk_t ext4_block_bitmap(struct super_block *sb, |
189 | struct ext4_group_desc *bg) | 180 | struct ext4_group_desc *bg) |
190 | { | 181 | { |
@@ -811,8 +802,8 @@ static void ext4_put_super(struct super_block *sb) | |||
811 | 802 | ||
812 | for (i = 0; i < sbi->s_gdb_count; i++) | 803 | for (i = 0; i < sbi->s_gdb_count; i++) |
813 | brelse(sbi->s_group_desc[i]); | 804 | brelse(sbi->s_group_desc[i]); |
814 | ext4_kvfree(sbi->s_group_desc); | 805 | kvfree(sbi->s_group_desc); |
815 | ext4_kvfree(sbi->s_flex_groups); | 806 | kvfree(sbi->s_flex_groups); |
816 | percpu_counter_destroy(&sbi->s_freeclusters_counter); | 807 | percpu_counter_destroy(&sbi->s_freeclusters_counter); |
817 | percpu_counter_destroy(&sbi->s_freeinodes_counter); | 808 | percpu_counter_destroy(&sbi->s_freeinodes_counter); |
818 | percpu_counter_destroy(&sbi->s_dirs_counter); | 809 | percpu_counter_destroy(&sbi->s_dirs_counter); |
@@ -1939,7 +1930,7 @@ int ext4_alloc_flex_bg_array(struct super_block *sb, ext4_group_t ngroup) | |||
1939 | memcpy(new_groups, sbi->s_flex_groups, | 1930 | memcpy(new_groups, sbi->s_flex_groups, |
1940 | (sbi->s_flex_groups_allocated * | 1931 | (sbi->s_flex_groups_allocated * |
1941 | sizeof(struct flex_groups))); | 1932 | sizeof(struct flex_groups))); |
1942 | ext4_kvfree(sbi->s_flex_groups); | 1933 | kvfree(sbi->s_flex_groups); |
1943 | } | 1934 | } |
1944 | sbi->s_flex_groups = new_groups; | 1935 | sbi->s_flex_groups = new_groups; |
1945 | sbi->s_flex_groups_allocated = size / sizeof(struct flex_groups); | 1936 | sbi->s_flex_groups_allocated = size / sizeof(struct flex_groups); |
@@ -4224,7 +4215,7 @@ failed_mount7: | |||
4224 | failed_mount6: | 4215 | failed_mount6: |
4225 | ext4_mb_release(sb); | 4216 | ext4_mb_release(sb); |
4226 | if (sbi->s_flex_groups) | 4217 | if (sbi->s_flex_groups) |
4227 | ext4_kvfree(sbi->s_flex_groups); | 4218 | kvfree(sbi->s_flex_groups); |
4228 | percpu_counter_destroy(&sbi->s_freeclusters_counter); | 4219 | percpu_counter_destroy(&sbi->s_freeclusters_counter); |
4229 | percpu_counter_destroy(&sbi->s_freeinodes_counter); | 4220 | percpu_counter_destroy(&sbi->s_freeinodes_counter); |
4230 | percpu_counter_destroy(&sbi->s_dirs_counter); | 4221 | percpu_counter_destroy(&sbi->s_dirs_counter); |
@@ -4253,7 +4244,7 @@ failed_mount3: | |||
4253 | failed_mount2: | 4244 | failed_mount2: |
4254 | for (i = 0; i < db_count; i++) | 4245 | for (i = 0; i < db_count; i++) |
4255 | brelse(sbi->s_group_desc[i]); | 4246 | brelse(sbi->s_group_desc[i]); |
4256 | ext4_kvfree(sbi->s_group_desc); | 4247 | kvfree(sbi->s_group_desc); |
4257 | failed_mount: | 4248 | failed_mount: |
4258 | if (sbi->s_chksum_driver) | 4249 | if (sbi->s_chksum_driver) |
4259 | crypto_free_shash(sbi->s_chksum_driver); | 4250 | crypto_free_shash(sbi->s_chksum_driver); |