Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfsd: cstate->session->se_client -> cstate->clp

I'm not sure why we're writing this out the hard way in so many places.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

J. Bruce Fields and committed by
Chuck Lever
ec59659b 1722b046

+10 -11
+2 -3
fs/nfsd/nfs4proc.c
··· 378 378 * Before RECLAIM_COMPLETE done, server should deny new lock 379 379 */ 380 380 if (nfsd4_has_session(cstate) && 381 - !test_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, 382 - &cstate->session->se_client->cl_flags) && 381 + !test_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, &cstate->clp->cl_flags) && 383 382 open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS) 384 383 return nfserr_grace; 385 384 ··· 1886 1887 nfserr = nfs_ok; 1887 1888 if (gdp->gd_maxcount != 0) { 1888 1889 nfserr = ops->proc_getdeviceinfo(exp->ex_path.mnt->mnt_sb, 1889 - rqstp, cstate->session->se_client, gdp); 1890 + rqstp, cstate->clp, gdp); 1890 1891 } 1891 1892 1892 1893 gdp->gd_notify_types &= ops->notify_types;
+8 -8
fs/nfsd/nfs4state.c
··· 3891 3891 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) 3892 3892 { 3893 3893 struct nfsd4_reclaim_complete *rc = &u->reclaim_complete; 3894 + struct nfs4_client *clp = cstate->clp; 3894 3895 __be32 status = 0; 3895 3896 3896 3897 if (rc->rca_one_fs) { ··· 3905 3904 } 3906 3905 3907 3906 status = nfserr_complete_already; 3908 - if (test_and_set_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, 3909 - &cstate->session->se_client->cl_flags)) 3907 + if (test_and_set_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, &clp->cl_flags)) 3910 3908 goto out; 3911 3909 3912 3910 status = nfserr_stale_clientid; 3913 - if (is_client_expired(cstate->session->se_client)) 3911 + if (is_client_expired(clp)) 3914 3912 /* 3915 3913 * The following error isn't really legal. 3916 3914 * But we only get here if the client just explicitly ··· 3920 3920 goto out; 3921 3921 3922 3922 status = nfs_ok; 3923 - nfsd4_client_record_create(cstate->session->se_client); 3924 - inc_reclaim_complete(cstate->session->se_client); 3923 + nfsd4_client_record_create(clp); 3924 + inc_reclaim_complete(clp); 3925 3925 out: 3926 3926 return status; 3927 3927 } ··· 5918 5918 { 5919 5919 struct nfsd4_test_stateid *test_stateid = &u->test_stateid; 5920 5920 struct nfsd4_test_stateid_id *stateid; 5921 - struct nfs4_client *cl = cstate->session->se_client; 5921 + struct nfs4_client *cl = cstate->clp; 5922 5922 5923 5923 list_for_each_entry(stateid, &test_stateid->ts_stateid_list, ts_id_list) 5924 5924 stateid->ts_id_status = ··· 5964 5964 stateid_t *stateid = &free_stateid->fr_stateid; 5965 5965 struct nfs4_stid *s; 5966 5966 struct nfs4_delegation *dp; 5967 - struct nfs4_client *cl = cstate->session->se_client; 5967 + struct nfs4_client *cl = cstate->clp; 5968 5968 __be32 ret = nfserr_bad_stateid; 5969 5969 5970 5970 spin_lock(&cl->cl_lock); ··· 6693 6693 if (nfsd4_has_session(cstate)) 6694 6694 /* See rfc 5661 18.10.3: given clientid is ignored: */ 6695 6695 memcpy(&lock->lk_new_clientid, 6696 - &cstate->session->se_client->cl_clientid, 6696 + &cstate->clp->cl_clientid, 6697 6697 sizeof(clientid_t)); 6698 6698 6699 6699 /* validate and update open stateid and open seqid */