aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2012-03-01 17:01:48 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-02 17:18:09 -0500
commitbb4dae5e5b5a92f0ffbcc6ac10c5e8afcd87934d (patch)
treea6ad907fbee535fff2f9234d9ebfb850f1026337 /fs
parent20d27e929fb4790a339a4ddcc9a27f14db06055b (diff)
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: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4xdr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index b5c5212cd184..48f539314f25 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1637,13 +1637,14 @@ static void encode_rename(struct xdr_stream *xdr, const struct qstr *oldname, co
1637 hdr->replen += decode_rename_maxsz; 1637 hdr->replen += decode_rename_maxsz;
1638} 1638}
1639 1639
1640static void encode_renew(struct xdr_stream *xdr, const struct nfs_client *client_stateid, struct compound_hdr *hdr) 1640static void encode_renew(struct xdr_stream *xdr, clientid4 clid,
1641 struct compound_hdr *hdr)
1641{ 1642{
1642 __be32 *p; 1643 __be32 *p;
1643 1644
1644 p = reserve_space(xdr, 12); 1645 p = reserve_space(xdr, 12);
1645 *p++ = cpu_to_be32(OP_RENEW); 1646 *p++ = cpu_to_be32(OP_RENEW);
1646 xdr_encode_hyper(p, client_stateid->cl_clientid); 1647 xdr_encode_hyper(p, clid);
1647 hdr->nops++; 1648 hdr->nops++;
1648 hdr->replen += decode_renew_maxsz; 1649 hdr->replen += decode_renew_maxsz;
1649} 1650}
@@ -2692,7 +2693,7 @@ static void nfs4_xdr_enc_renew(struct rpc_rqst *req, struct xdr_stream *xdr,
2692 }; 2693 };
2693 2694
2694 encode_compound_hdr(xdr, req, &hdr); 2695 encode_compound_hdr(xdr, req, &hdr);
2695 encode_renew(xdr, clp, &hdr); 2696 encode_renew(xdr, clp->cl_clientid, &hdr);
2696 encode_nops(&hdr); 2697 encode_nops(&hdr);
2697} 2698}
2698 2699