From: Wei Yongjun Date: Tue, 9 Apr 2013 06:15:31 +0000 (+0800) Subject: nfsd: use kmem_cache_free() instead of kfree() X-Git-Tag: v3.9.1~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2696526a242427f720f87d8650557fda19ca2d6b;p=karo-tx-linux.git nfsd: use kmem_cache_free() instead of kfree() commit 2c44a23471d048118e49b616d08df0729cdbd9f1 upstream. memory allocated by kmem_cache_alloc() should be freed using kmem_cache_free(), not kfree(). Signed-off-by: Wei Yongjun Signed-off-by: J. Bruce Fields Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a0986ce661ce..f9a5e62b7683 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -261,7 +261,7 @@ kmem_cache *slab) min_stateid = 0; return stid; out_free: - kfree(stid); + kmem_cache_free(slab, stid); return NULL; }