Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb4dae5e authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust
Browse files

NFS: Simplify arguments of encode_renew()



Clean up: pass just the clientid4 to encode_renew().  This enables it
to be used by callers who might not have an full nfs_client.

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 20d27e92
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -1637,13 +1637,14 @@ static void encode_rename(struct xdr_stream *xdr, const struct qstr *oldname, co
	hdr->replen += decode_rename_maxsz;
	hdr->replen += decode_rename_maxsz;
}
}


static void encode_renew(struct xdr_stream *xdr, const struct nfs_client *client_stateid, struct compound_hdr *hdr)
static void encode_renew(struct xdr_stream *xdr, clientid4 clid,
			 struct compound_hdr *hdr)
{
{
	__be32 *p;
	__be32 *p;


	p = reserve_space(xdr, 12);
	p = reserve_space(xdr, 12);
	*p++ = cpu_to_be32(OP_RENEW);
	*p++ = cpu_to_be32(OP_RENEW);
	xdr_encode_hyper(p, client_stateid->cl_clientid);
	xdr_encode_hyper(p, clid);
	hdr->nops++;
	hdr->nops++;
	hdr->replen += decode_renew_maxsz;
	hdr->replen += decode_renew_maxsz;
}
}
@@ -2692,7 +2693,7 @@ static void nfs4_xdr_enc_renew(struct rpc_rqst *req, struct xdr_stream *xdr,
	};
	};


	encode_compound_hdr(xdr, req, &hdr);
	encode_compound_hdr(xdr, req, &hdr);
	encode_renew(xdr, clp, &hdr);
	encode_renew(xdr, clp->cl_clientid, &hdr);
	encode_nops(&hdr);
	encode_nops(&hdr);
}
}