From: Benny Halevy Date: Mon, 14 Oct 2013 10:44:52 +0000 (+0300) Subject: nfsd: nfs4_free_stid X-Git-Tag: upstream/snapshot3+hdmi~3948^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9857df815f17417be116f800636f460e247afb5a;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git nfsd: nfs4_free_stid Make it symmetric to nfs4_alloc_stid. Signed-off-by: Benny Halevy Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a601fd4..9cb1b17 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -402,11 +402,16 @@ static void remove_stid(struct nfs4_stid *s) idr_remove(stateids, s->sc_stateid.si_opaque.so_id); } +static void nfs4_free_stid(struct kmem_cache *slab, struct nfs4_stid *s) +{ + kmem_cache_free(slab, s); +} + void nfs4_put_delegation(struct nfs4_delegation *dp) { if (atomic_dec_and_test(&dp->dl_count)) { - kmem_cache_free(deleg_slab, dp); + nfs4_free_stid(deleg_slab, &dp->dl_stid); num_delegations--; } } @@ -610,7 +615,7 @@ static void close_generic_stateid(struct nfs4_ol_stateid *stp) static void free_generic_stateid(struct nfs4_ol_stateid *stp) { remove_stid(&stp->st_stid); - kmem_cache_free(stateid_slab, stp); + nfs4_free_stid(stateid_slab, &stp->st_stid); } static void release_lock_stateid(struct nfs4_ol_stateid *stp)