aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2014-07-30 08:27:32 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-08-05 10:55:17 -0400
commit3974552dcea94619b0f51c5a52f90671067cbcec (patch)
tree9488062f93a6c9874467638e53ba4be24467056a
parent3234975f477f746c22d076ea178a79ea104b2ca7 (diff)
nfsd: Remove nfs4_lock_state(): exchange_id, create/destroy_session()
Also destroy_clientid and bind_conn_to_session. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--fs/nfsd/nfs4state.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 5b3452a00cb2..e6b27ede3388 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2209,7 +2209,6 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
2209 return nfserr_jukebox; 2209 return nfserr_jukebox;
2210 2210
2211 /* Cases below refer to rfc 5661 section 18.35.4: */ 2211 /* Cases below refer to rfc 5661 section 18.35.4: */
2212 nfs4_lock_state();
2213 spin_lock(&nn->client_lock); 2212 spin_lock(&nn->client_lock);
2214 conf = find_confirmed_client_by_name(&exid->clname, nn); 2213 conf = find_confirmed_client_by_name(&exid->clname, nn);
2215 if (conf) { 2214 if (conf) {
@@ -2288,7 +2287,6 @@ out_copy:
2288 2287
2289out: 2288out:
2290 spin_unlock(&nn->client_lock); 2289 spin_unlock(&nn->client_lock);
2291 nfs4_unlock_state();
2292 if (new) 2290 if (new)
2293 expire_client(new); 2291 expire_client(new);
2294 if (unconf) 2292 if (unconf)
@@ -2462,7 +2460,6 @@ nfsd4_create_session(struct svc_rqst *rqstp,
2462 if (!conn) 2460 if (!conn)
2463 goto out_free_session; 2461 goto out_free_session;
2464 2462
2465 nfs4_lock_state();
2466 spin_lock(&nn->client_lock); 2463 spin_lock(&nn->client_lock);
2467 unconf = find_unconfirmed_client(&cr_ses->clientid, true, nn); 2464 unconf = find_unconfirmed_client(&cr_ses->clientid, true, nn);
2468 conf = find_confirmed_client(&cr_ses->clientid, true, nn); 2465 conf = find_confirmed_client(&cr_ses->clientid, true, nn);
@@ -2532,13 +2529,11 @@ nfsd4_create_session(struct svc_rqst *rqstp,
2532 /* init connection and backchannel */ 2529 /* init connection and backchannel */
2533 nfsd4_init_conn(rqstp, conn, new); 2530 nfsd4_init_conn(rqstp, conn, new);
2534 nfsd4_put_session(new); 2531 nfsd4_put_session(new);
2535 nfs4_unlock_state();
2536 if (old) 2532 if (old)
2537 expire_client(old); 2533 expire_client(old);
2538 return status; 2534 return status;
2539out_free_conn: 2535out_free_conn:
2540 spin_unlock(&nn->client_lock); 2536 spin_unlock(&nn->client_lock);
2541 nfs4_unlock_state();
2542 free_conn(conn); 2537 free_conn(conn);
2543 if (old) 2538 if (old)
2544 expire_client(old); 2539 expire_client(old);
@@ -2594,7 +2589,6 @@ __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp,
2594 2589
2595 if (!nfsd4_last_compound_op(rqstp)) 2590 if (!nfsd4_last_compound_op(rqstp))
2596 return nfserr_not_only_op; 2591 return nfserr_not_only_op;
2597 nfs4_lock_state();
2598 spin_lock(&nn->client_lock); 2592 spin_lock(&nn->client_lock);
2599 session = find_in_sessionid_hashtbl(&bcts->sessionid, net, &status); 2593 session = find_in_sessionid_hashtbl(&bcts->sessionid, net, &status);
2600 spin_unlock(&nn->client_lock); 2594 spin_unlock(&nn->client_lock);
@@ -2615,7 +2609,6 @@ __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp,
2615out: 2609out:
2616 nfsd4_put_session(session); 2610 nfsd4_put_session(session);
2617out_no_session: 2611out_no_session:
2618 nfs4_unlock_state();
2619 return status; 2612 return status;
2620} 2613}
2621 2614
@@ -2637,7 +2630,6 @@ nfsd4_destroy_session(struct svc_rqst *r,
2637 struct net *net = SVC_NET(r); 2630 struct net *net = SVC_NET(r);
2638 struct nfsd_net *nn = net_generic(net, nfsd_net_id); 2631 struct nfsd_net *nn = net_generic(net, nfsd_net_id);
2639 2632
2640 nfs4_lock_state();
2641 status = nfserr_not_only_op; 2633 status = nfserr_not_only_op;
2642 if (nfsd4_compound_in_session(cstate->session, &sessionid->sessionid)) { 2634 if (nfsd4_compound_in_session(cstate->session, &sessionid->sessionid)) {
2643 if (!nfsd4_last_compound_op(r)) 2635 if (!nfsd4_last_compound_op(r))
@@ -2667,7 +2659,6 @@ out_put_session:
2667out_client_lock: 2659out_client_lock:
2668 spin_unlock(&nn->client_lock); 2660 spin_unlock(&nn->client_lock);
2669out: 2661out:
2670 nfs4_unlock_state();
2671 return status; 2662 return status;
2672} 2663}
2673 2664
@@ -2870,7 +2861,6 @@ nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta
2870 __be32 status = 0; 2861 __be32 status = 0;
2871 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); 2862 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
2872 2863
2873 nfs4_lock_state();
2874 spin_lock(&nn->client_lock); 2864 spin_lock(&nn->client_lock);
2875 unconf = find_unconfirmed_client(&dc->clientid, true, nn); 2865 unconf = find_unconfirmed_client(&dc->clientid, true, nn);
2876 conf = find_confirmed_client(&dc->clientid, true, nn); 2866 conf = find_confirmed_client(&dc->clientid, true, nn);
@@ -2899,7 +2889,6 @@ nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta
2899 unhash_client_locked(clp); 2889 unhash_client_locked(clp);
2900out: 2890out:
2901 spin_unlock(&nn->client_lock); 2891 spin_unlock(&nn->client_lock);
2902 nfs4_unlock_state();
2903 if (clp) 2892 if (clp)
2904 expire_client(clp); 2893 expire_client(clp);
2905 return status; 2894 return status;