static __be32 set_client(clientid_t *clid,
struct nfsd4_compound_state *cstate,
- struct nfsd_net *nn,
- bool sessions)
+ struct nfsd_net *nn)
{
if (cstate->clp) {
if (!same_clid(&cstate->clp->cl_clientid, clid))
if (STALE_CLIENTID(clid, nn))
return nfserr_stale_clientid;
/*
- * For v4.1+ we get the client in the SEQUENCE op. If we don't have one
- * cached already then we know this is for is for v4.0 and "sessions"
- * will be false.
+ * We're in the 4.0 case (otherwise the SEQUENCE op would have
+ * set cstate->clp), so session = false:
*/
- WARN_ON_ONCE(cstate->session);
- cstate->clp = lookup_clientid(clid, sessions, nn);
+ cstate->clp = lookup_clientid(clid, false, nn);
if (!cstate->clp)
return nfserr_expired;
return nfs_ok;
if (open->op_file == NULL)
return nfserr_jukebox;
- status = set_client(clientid, cstate, nn, false);
+ status = set_client(clientid, cstate, nn);
if (status)
return status;
clp = cstate->clp;
struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
trace_nfsd_clid_renew(clid);
- status = set_client(clid, cstate, nn, false);
+ status = set_client(clid, cstate, nn);
if (status)
return status;
clp = cstate->clp;
if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
CLOSE_STATEID(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 (cstate->session)
return nfserr_bad_stateid;
return nfserr_inval;
if (!nfsd4_has_session(cstate)) {
- status = set_client(&lockt->lt_clientid, cstate, nn, false);
+ status = set_client(&lockt->lt_clientid, cstate, nn);
if (status)
goto out;
}
dprintk("nfsd4_release_lockowner clientid: (%08x/%08x):\n",
clid->cl_boot, clid->cl_id);
- status = set_client(clid, cstate, nn, false);
+ status = set_client(clid, cstate, nn);
if (status)
return status;
__be32 status;
/* find clientid in conf_id_hashtbl */
- status = set_client(clid, cstate, nn, false);
+ status = set_client(clid, cstate, nn);
if (status)
return nfserr_reclaim_bad;