nfsd: remove unused set_client argument
[ Upstream commit f71475ba8c2a77fff8051903cf4b7d826c3d1693 ] Every caller is setting this argument to false, so we don't need it. Also cut this comment a bit and remove an unnecessary warning. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
87ab73c1cc
commit
25ac4fdbdc
@ -4690,8 +4690,7 @@ static struct nfs4_client *lookup_clientid(clientid_t *clid, bool sessions,
|
|||||||
|
|
||||||
static __be32 set_client(clientid_t *clid,
|
static __be32 set_client(clientid_t *clid,
|
||||||
struct nfsd4_compound_state *cstate,
|
struct nfsd4_compound_state *cstate,
|
||||||
struct nfsd_net *nn,
|
struct nfsd_net *nn)
|
||||||
bool sessions)
|
|
||||||
{
|
{
|
||||||
if (cstate->clp) {
|
if (cstate->clp) {
|
||||||
if (!same_clid(&cstate->clp->cl_clientid, clid))
|
if (!same_clid(&cstate->clp->cl_clientid, clid))
|
||||||
@ -4701,12 +4700,10 @@ static __be32 set_client(clientid_t *clid,
|
|||||||
if (STALE_CLIENTID(clid, nn))
|
if (STALE_CLIENTID(clid, nn))
|
||||||
return nfserr_stale_clientid;
|
return nfserr_stale_clientid;
|
||||||
/*
|
/*
|
||||||
* For v4.1+ we get the client in the SEQUENCE op. If we don't have one
|
* We're in the 4.0 case (otherwise the SEQUENCE op would have
|
||||||
* cached already then we know this is for is for v4.0 and "sessions"
|
* set cstate->clp), so session = false:
|
||||||
* will be false.
|
|
||||||
*/
|
*/
|
||||||
WARN_ON_ONCE(cstate->session);
|
cstate->clp = lookup_clientid(clid, false, nn);
|
||||||
cstate->clp = lookup_clientid(clid, sessions, nn);
|
|
||||||
if (!cstate->clp)
|
if (!cstate->clp)
|
||||||
return nfserr_expired;
|
return nfserr_expired;
|
||||||
return nfs_ok;
|
return nfs_ok;
|
||||||
@ -4730,7 +4727,7 @@ nfsd4_process_open1(struct nfsd4_compound_state *cstate,
|
|||||||
if (open->op_file == NULL)
|
if (open->op_file == NULL)
|
||||||
return nfserr_jukebox;
|
return nfserr_jukebox;
|
||||||
|
|
||||||
status = set_client(clientid, cstate, nn, false);
|
status = set_client(clientid, cstate, nn);
|
||||||
if (status)
|
if (status)
|
||||||
return status;
|
return status;
|
||||||
clp = cstate->clp;
|
clp = cstate->clp;
|
||||||
@ -5320,7 +5317,7 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|||||||
struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
|
struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
|
||||||
|
|
||||||
trace_nfsd_clid_renew(clid);
|
trace_nfsd_clid_renew(clid);
|
||||||
status = set_client(clid, cstate, nn, false);
|
status = set_client(clid, cstate, nn);
|
||||||
if (status)
|
if (status)
|
||||||
return status;
|
return status;
|
||||||
clp = cstate->clp;
|
clp = cstate->clp;
|
||||||
@ -5701,7 +5698,7 @@ nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate,
|
|||||||
if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
|
if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
|
||||||
CLOSE_STATEID(stateid))
|
CLOSE_STATEID(stateid))
|
||||||
return nfserr_bad_stateid;
|
return nfserr_bad_stateid;
|
||||||
status = set_client(&stateid->si_opaque.so_clid, cstate, nn, false);
|
status = set_client(&stateid->si_opaque.so_clid, cstate, nn);
|
||||||
if (status == nfserr_stale_clientid) {
|
if (status == nfserr_stale_clientid) {
|
||||||
if (cstate->session)
|
if (cstate->session)
|
||||||
return nfserr_bad_stateid;
|
return nfserr_bad_stateid;
|
||||||
@ -6938,7 +6935,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
|||||||
return nfserr_inval;
|
return nfserr_inval;
|
||||||
|
|
||||||
if (!nfsd4_has_session(cstate)) {
|
if (!nfsd4_has_session(cstate)) {
|
||||||
status = set_client(&lockt->lt_clientid, cstate, nn, false);
|
status = set_client(&lockt->lt_clientid, cstate, nn);
|
||||||
if (status)
|
if (status)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -7122,7 +7119,7 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp,
|
|||||||
dprintk("nfsd4_release_lockowner clientid: (%08x/%08x):\n",
|
dprintk("nfsd4_release_lockowner clientid: (%08x/%08x):\n",
|
||||||
clid->cl_boot, clid->cl_id);
|
clid->cl_boot, clid->cl_id);
|
||||||
|
|
||||||
status = set_client(clid, cstate, nn, false);
|
status = set_client(clid, cstate, nn);
|
||||||
if (status)
|
if (status)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
@ -7262,7 +7259,7 @@ nfs4_check_open_reclaim(clientid_t *clid,
|
|||||||
__be32 status;
|
__be32 status;
|
||||||
|
|
||||||
/* find clientid in conf_id_hashtbl */
|
/* find clientid in conf_id_hashtbl */
|
||||||
status = set_client(clid, cstate, nn, false);
|
status = set_client(clid, cstate, nn);
|
||||||
if (status)
|
if (status)
|
||||||
return nfserr_reclaim_bad;
|
return nfserr_reclaim_bad;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user