aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index adc51d10d435..cf650cbb814b 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -690,13 +690,6 @@ free_client(struct nfs4_client *clp)
690 kfree(clp); 690 kfree(clp);
691} 691}
692 692
693void
694put_nfs4_client(struct nfs4_client *clp)
695{
696 if (atomic_dec_and_test(&clp->cl_count))
697 free_client(clp);
698}
699
700static void 693static void
701expire_client(struct nfs4_client *clp) 694expire_client(struct nfs4_client *clp)
702{ 695{
@@ -735,7 +728,7 @@ expire_client(struct nfs4_client *clp)
735 nfsd4_set_callback_client(clp, NULL); 728 nfsd4_set_callback_client(clp, NULL);
736 if (clp->cl_cb_xprt) 729 if (clp->cl_cb_xprt)
737 svc_xprt_put(clp->cl_cb_xprt); 730 svc_xprt_put(clp->cl_cb_xprt);
738 put_nfs4_client(clp); 731 free_client(clp);
739} 732}
740 733
741static void copy_verf(struct nfs4_client *target, nfs4_verifier *source) 734static void copy_verf(struct nfs4_client *target, nfs4_verifier *source)
@@ -821,7 +814,6 @@ static struct nfs4_client *create_client(struct xdr_netobj name, char *recdir,
821 } 814 }
822 815
823 memcpy(clp->cl_recdir, recdir, HEXDIR_LEN); 816 memcpy(clp->cl_recdir, recdir, HEXDIR_LEN);
824 atomic_set(&clp->cl_count, 1);
825 atomic_set(&clp->cl_cb_conn.cb_set, 0); 817 atomic_set(&clp->cl_cb_conn.cb_set, 0);
826 INIT_LIST_HEAD(&clp->cl_idhash); 818 INIT_LIST_HEAD(&clp->cl_idhash);
827 INIT_LIST_HEAD(&clp->cl_strhash); 819 INIT_LIST_HEAD(&clp->cl_strhash);
@@ -2010,7 +2002,6 @@ void nfsd_break_deleg_cb(struct file_lock *fl)
2010 * lock) we know the server hasn't removed the lease yet, we know 2002 * lock) we know the server hasn't removed the lease yet, we know
2011 * it's safe to take a reference: */ 2003 * it's safe to take a reference: */
2012 atomic_inc(&dp->dl_count); 2004 atomic_inc(&dp->dl_count);
2013 atomic_inc(&dp->dl_client->cl_count);
2014 2005
2015 spin_lock(&recall_lock); 2006 spin_lock(&recall_lock);
2016 list_add_tail(&dp->dl_recall_lru, &del_recall_lru); 2007 list_add_tail(&dp->dl_recall_lru, &del_recall_lru);