diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-07-24 03:17:07 +0530 |
---|---|---|
committer | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-07-24 11:57:27 +0400 |
commit | 7d5079aa8bc9ca25e61576820d07503b2a558f9b (patch) | |
tree | 2b5aacc0aa5033f148aca72f0996124c3ca7bf0e /fs/ceph | |
parent | d0d0db2268cc343c2361c83510d8e9711021fcce (diff) | |
download | lwn-7d5079aa8bc9ca25e61576820d07503b2a558f9b.tar.gz lwn-7d5079aa8bc9ca25e61576820d07503b2a558f9b.zip |
rbd: use rbd_segment_name_free() instead of kfree()
Free memory allocated using kmem_cache_zalloc using kmem_cache_free
rather than kfree. The helper rbd_segment_name_free does the job here.
Its position is shifted above the calling function.
The Coccinelle semantic patch that detects this change is as follows:
// <smpl>
@@
expression x,E,c;
@@
x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,...)
... when != x = E
when != &x
?-kfree(x)
+kmem_cache_free(c,x)
// </smpl>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Diffstat (limited to 'fs/ceph')
0 files changed, 0 insertions, 0 deletions