]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ext4: Free ext4_prealloc_space using kmem_cache_free
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Sun, 16 Nov 2008 16:05:32 +0000 (11:05 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Dec 2008 18:55:41 +0000 (10:55 -0800)
(cherry picked from commit 688f05a01983711a4e715b1d6e15a89a89c96a66)

We should use kmem_cache_free to free memory allocated
via kmem_cache_alloc

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/mballoc.c

index 0d51106b17c8e9b32584627487bf7ffa65de1bea..ba86b563381a4a058e82237a667221ac633364d5 100644 (file)
@@ -2575,7 +2575,7 @@ static void ext4_mb_cleanup_pa(struct ext4_group_info *grp)
                pa = list_entry(cur, struct ext4_prealloc_space, pa_group_list);
                list_del(&pa->pa_group_list);
                count++;
-               kfree(pa);
+               kmem_cache_free(ext4_pspace_cachep, pa);
        }
        if (count)
                mb_debug("mballoc: %u PAs left\n", count);