diff options
| author | Filipe Manana <fdmanana@suse.com> | 2015-06-13 06:52:56 +0100 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 19:30:26 +0200 |
| commit | 073a07daafed2fab24a6b1d796178ddb435711ed (patch) | |
| tree | 1ef6293ba0036b7438f7856c429d963f0423d927 /fs/fuse | |
| parent | f665d97d6f30849c0bab166683afbb54b4180bf3 (diff) | |
Btrfs: use kmem_cache_free when freeing entry in inode cache
commit c3f4a1685bb87e59c886ee68f7967eae07d4dffa upstream.
The free space entries are allocated using kmem_cache_zalloc(),
through __btrfs_add_free_space(), therefore we should use
kmem_cache_free() and not kfree() to avoid any confusion and
any potential problem. Looking at the kfree() definition at
mm/slab.c it has the following comment:
/*
* (...)
*
* Don't free memory not originally allocated by kmalloc()
* or you will run into trouble.
*/
So better be safe and use kmem_cache_free().
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'fs/fuse')
0 files changed, 0 insertions, 0 deletions
