summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@primarydata.com>2013-10-15 09:58:00 +0300
committerJ. Bruce Fields <bfields@redhat.com>2013-10-28 15:58:32 -0400
commit7ebe40f20372688a627ad6c754bc0d1c05df58a9 (patch)
tree263b3862b1f38fa7c311f92613394b05a825aeb1 /fs/nfsd/nfs4state.c
parent5d7dab83e3e55e81a88c406da71afde0ebaa6ad8 (diff)
downloadlinux-7ebe40f20372688a627ad6c754bc0d1c05df58a9.tar.bz2
nfsd: remove_stid can be incorporated into nfs4_put_delegation
All calls to nfs4_put_delegation are preceded with remove_stid. Signed-off-by: Benny Halevy <bhalevy@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 3feb38e818ab..77dfc5a6a011 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -410,6 +410,7 @@ static void nfs4_free_stid(struct kmem_cache *slab, struct nfs4_stid *s)
void
nfs4_put_delegation(struct nfs4_delegation *dp)
{
+ remove_stid(&dp->dl_stid);
if (atomic_dec_and_test(&dp->dl_count)) {
nfs4_free_stid(deleg_slab, &dp->dl_stid);
num_delegations--;
@@ -450,14 +451,12 @@ unhash_delegation(struct nfs4_delegation *dp)
static void destroy_revoked_delegation(struct nfs4_delegation *dp)
{
list_del_init(&dp->dl_recall_lru);
- remove_stid(&dp->dl_stid);
nfs4_put_delegation(dp);
}
static void destroy_delegation(struct nfs4_delegation *dp)
{
unhash_delegation(dp);
- remove_stid(&dp->dl_stid);
nfs4_put_delegation(dp);
}
@@ -3159,7 +3158,6 @@ nfs4_open_delegation(struct net *net, struct svc_fh *fh,
open->op_delegate_type = NFS4_OPEN_DELEGATE_READ;
return;
out_free:
- remove_stid(&dp->dl_stid);
nfs4_put_delegation(dp);
out_no_deleg:
open->op_delegate_type = NFS4_OPEN_DELEGATE_NONE;