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.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index cf650cbb814b..59c9bd4c89e1 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -726,8 +726,8 @@ expire_client(struct nfs4_client *clp)
726 release_session(ses); 726 release_session(ses);
727 } 727 }
728 nfsd4_set_callback_client(clp, NULL); 728 nfsd4_set_callback_client(clp, NULL);
729 if (clp->cl_cb_xprt) 729 if (clp->cl_cb_conn.cb_xprt)
730 svc_xprt_put(clp->cl_cb_xprt); 730 svc_xprt_put(clp->cl_cb_conn.cb_xprt);
731 free_client(clp); 731 free_client(clp);
732} 732}
733 733
@@ -814,7 +814,7 @@ static struct nfs4_client *create_client(struct xdr_netobj name, char *recdir,
814 } 814 }
815 815
816 memcpy(clp->cl_recdir, recdir, HEXDIR_LEN); 816 memcpy(clp->cl_recdir, recdir, HEXDIR_LEN);
817 atomic_set(&clp->cl_cb_conn.cb_set, 0); 817 atomic_set(&clp->cl_cb_set, 0);
818 INIT_LIST_HEAD(&clp->cl_idhash); 818 INIT_LIST_HEAD(&clp->cl_idhash);
819 INIT_LIST_HEAD(&clp->cl_strhash); 819 INIT_LIST_HEAD(&clp->cl_strhash);
820 INIT_LIST_HEAD(&clp->cl_openowners); 820 INIT_LIST_HEAD(&clp->cl_openowners);
@@ -1302,8 +1302,8 @@ nfsd4_create_session(struct svc_rqst *rqstp,
1302 move_to_confirmed(unconf); 1302 move_to_confirmed(unconf);
1303 1303
1304 if (cr_ses->flags & SESSION4_BACK_CHAN) { 1304 if (cr_ses->flags & SESSION4_BACK_CHAN) {
1305 unconf->cl_cb_xprt = rqstp->rq_xprt; 1305 unconf->cl_cb_conn.cb_xprt = rqstp->rq_xprt;
1306 svc_xprt_get(unconf->cl_cb_xprt); 1306 svc_xprt_get(rqstp->rq_xprt);
1307 rpc_copy_addr( 1307 rpc_copy_addr(
1308 (struct sockaddr *)&unconf->cl_cb_conn.cb_addr, 1308 (struct sockaddr *)&unconf->cl_cb_conn.cb_addr,
1309 sa); 1309 sa);
@@ -1607,7 +1607,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
1607 else { 1607 else {
1608 /* XXX: We just turn off callbacks until we can handle 1608 /* XXX: We just turn off callbacks until we can handle
1609 * change request correctly. */ 1609 * change request correctly. */
1610 atomic_set(&conf->cl_cb_conn.cb_set, 0); 1610 atomic_set(&conf->cl_cb_set, 0);
1611 expire_client(unconf); 1611 expire_client(unconf);
1612 status = nfs_ok; 1612 status = nfs_ok;
1613 1613
@@ -2320,7 +2320,7 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
2320{ 2320{
2321 struct nfs4_delegation *dp; 2321 struct nfs4_delegation *dp;
2322 struct nfs4_stateowner *sop = stp->st_stateowner; 2322 struct nfs4_stateowner *sop = stp->st_stateowner;
2323 struct nfs4_cb_conn *cb = &sop->so_client->cl_cb_conn; 2323 int cb_up = atomic_read(&sop->so_client->cl_cb_set);
2324 struct file_lock fl, *flp = &fl; 2324 struct file_lock fl, *flp = &fl;
2325 int status, flag = 0; 2325 int status, flag = 0;
2326 2326
@@ -2328,7 +2328,7 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
2328 open->op_recall = 0; 2328 open->op_recall = 0;
2329 switch (open->op_claim_type) { 2329 switch (open->op_claim_type) {
2330 case NFS4_OPEN_CLAIM_PREVIOUS: 2330 case NFS4_OPEN_CLAIM_PREVIOUS:
2331 if (!atomic_read(&cb->cb_set)) 2331 if (!cb_up)
2332 open->op_recall = 1; 2332 open->op_recall = 1;
2333 flag = open->op_delegate_type; 2333 flag = open->op_delegate_type;
2334 if (flag == NFS4_OPEN_DELEGATE_NONE) 2334 if (flag == NFS4_OPEN_DELEGATE_NONE)
@@ -2339,7 +2339,7 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
2339 * had the chance to reclaim theirs.... */ 2339 * had the chance to reclaim theirs.... */
2340 if (locks_in_grace()) 2340 if (locks_in_grace())
2341 goto out; 2341 goto out;
2342 if (!atomic_read(&cb->cb_set) || !sop->so_confirmed) 2342 if (!cb_up || !sop->so_confirmed)
2343 goto out; 2343 goto out;
2344 if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE) 2344 if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE)
2345 flag = NFS4_OPEN_DELEGATE_WRITE; 2345 flag = NFS4_OPEN_DELEGATE_WRITE;
@@ -2510,7 +2510,7 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
2510 renew_client(clp); 2510 renew_client(clp);
2511 status = nfserr_cb_path_down; 2511 status = nfserr_cb_path_down;
2512 if (!list_empty(&clp->cl_delegations) 2512 if (!list_empty(&clp->cl_delegations)
2513 && !atomic_read(&clp->cl_cb_conn.cb_set)) 2513 && !atomic_read(&clp->cl_cb_set))
2514 goto out; 2514 goto out;
2515 status = nfs_ok; 2515 status = nfs_ok;
2516out: 2516out: