Re: [PATCH] rbd: Use kmem_cache_free

2014-07-22 Thread Ilya Dryomov
On Tue, Jul 22, 2014 at 10:11 PM, Himangi Saraogi wrote: > Free memory allocated using kmem_cache_zalloc using kmem_cache_free > rather than kfree. > > The Coccinelle semantic patch that makes this change is as follows: > > // > @@ > expression x,E,c; > @@ > > x = \(kmem_cache_alloc\|kmem_cache_

[PATCH] rbd: Use kmem_cache_free

2014-07-22 Thread Himangi Saraogi
Free memory allocated using kmem_cache_zalloc using kmem_cache_free rather than kfree. The Coccinelle semantic patch that makes this change is as follows: // @@ expression x,E,c; @@ x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,...) ... when != x = E when != &x ?-k