diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-04 20:49:32 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-06 10:32:49 -0500 |
commit | 700195142185c05757cfd27f8070ae0e9e07710b (patch) | |
tree | 93070a75b4c35b4d5c1ee519d5952760484da12d /fs | |
parent | cd93710e8d290711ba2e08e1d1a380013aad667d (diff) |
NFSv4: Cleanup - convert more functions to use encode_op_hdr
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 62effaf579c4..f958849cb304 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1644,8 +1644,7 @@ static void encode_setclientid(struct xdr_stream *xdr, const struct nfs4_setclie | |||
1644 | { | 1644 | { |
1645 | __be32 *p; | 1645 | __be32 *p; |
1646 | 1646 | ||
1647 | p = reserve_space(xdr, 4); | 1647 | encode_op_hdr(xdr, OP_SETCLIENTID, decode_setclientid_maxsz, hdr); |
1648 | *p = cpu_to_be32(OP_SETCLIENTID); | ||
1649 | encode_nfs4_verifier(xdr, setclientid->sc_verifier); | 1648 | encode_nfs4_verifier(xdr, setclientid->sc_verifier); |
1650 | 1649 | ||
1651 | encode_string(xdr, setclientid->sc_name_len, setclientid->sc_name); | 1650 | encode_string(xdr, setclientid->sc_name_len, setclientid->sc_name); |
@@ -1655,8 +1654,6 @@ static void encode_setclientid(struct xdr_stream *xdr, const struct nfs4_setclie | |||
1655 | encode_string(xdr, setclientid->sc_uaddr_len, setclientid->sc_uaddr); | 1654 | encode_string(xdr, setclientid->sc_uaddr_len, setclientid->sc_uaddr); |
1656 | p = reserve_space(xdr, 4); | 1655 | p = reserve_space(xdr, 4); |
1657 | *p = cpu_to_be32(setclientid->sc_cb_ident); | 1656 | *p = cpu_to_be32(setclientid->sc_cb_ident); |
1658 | hdr->nops++; | ||
1659 | hdr->replen += decode_setclientid_maxsz; | ||
1660 | } | 1657 | } |
1661 | 1658 | ||
1662 | static void encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs4_setclientid_res *arg, struct compound_hdr *hdr) | 1659 | static void encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs4_setclientid_res *arg, struct compound_hdr *hdr) |
@@ -1709,8 +1706,7 @@ static void encode_exchange_id(struct xdr_stream *xdr, | |||
1709 | char impl_name[NFS4_OPAQUE_LIMIT]; | 1706 | char impl_name[NFS4_OPAQUE_LIMIT]; |
1710 | int len = 0; | 1707 | int len = 0; |
1711 | 1708 | ||
1712 | p = reserve_space(xdr, 4); | 1709 | encode_op_hdr(xdr, OP_EXCHANGE_ID, decode_exchange_id_maxsz, hdr); |
1713 | *p = cpu_to_be32(OP_EXCHANGE_ID); | ||
1714 | encode_nfs4_verifier(xdr, args->verifier); | 1710 | encode_nfs4_verifier(xdr, args->verifier); |
1715 | 1711 | ||
1716 | encode_string(xdr, args->id_len, args->id); | 1712 | encode_string(xdr, args->id_len, args->id); |
@@ -1740,9 +1736,6 @@ static void encode_exchange_id(struct xdr_stream *xdr, | |||
1740 | *p = cpu_to_be32(0); | 1736 | *p = cpu_to_be32(0); |
1741 | } else | 1737 | } else |
1742 | *p = cpu_to_be32(0); /* implementation id array length=0 */ | 1738 | *p = cpu_to_be32(0); /* implementation id array length=0 */ |
1743 | |||
1744 | hdr->nops++; | ||
1745 | hdr->replen += decode_exchange_id_maxsz; | ||
1746 | } | 1739 | } |
1747 | 1740 | ||
1748 | static void encode_create_session(struct xdr_stream *xdr, | 1741 | static void encode_create_session(struct xdr_stream *xdr, |