提交 d61005a6 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] xdr annotations: NFSv3

on-the-wire data is big-endian

[in large part pulled from Alexey's patch]
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Acked-by: NTrond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9d787a75
...@@ -105,14 +105,14 @@ static struct { ...@@ -105,14 +105,14 @@ static struct {
/* /*
* Common NFS XDR functions as inlines * Common NFS XDR functions as inlines
*/ */
static inline u32 * static inline __be32 *
xdr_encode_fhandle(u32 *p, struct nfs_fh *fh) xdr_encode_fhandle(__be32 *p, struct nfs_fh *fh)
{ {
return xdr_encode_array(p, fh->data, fh->size); return xdr_encode_array(p, fh->data, fh->size);
} }
static inline u32 * static inline __be32 *
xdr_decode_fhandle(u32 *p, struct nfs_fh *fh) xdr_decode_fhandle(__be32 *p, struct nfs_fh *fh)
{ {
if ((fh->size = ntohl(*p++)) <= NFS3_FHSIZE) { if ((fh->size = ntohl(*p++)) <= NFS3_FHSIZE) {
memcpy(fh->data, p, fh->size); memcpy(fh->data, p, fh->size);
...@@ -124,24 +124,24 @@ xdr_decode_fhandle(u32 *p, struct nfs_fh *fh) ...@@ -124,24 +124,24 @@ xdr_decode_fhandle(u32 *p, struct nfs_fh *fh)
/* /*
* Encode/decode time. * Encode/decode time.
*/ */
static inline u32 * static inline __be32 *
xdr_encode_time3(u32 *p, struct timespec *timep) xdr_encode_time3(__be32 *p, struct timespec *timep)
{ {
*p++ = htonl(timep->tv_sec); *p++ = htonl(timep->tv_sec);
*p++ = htonl(timep->tv_nsec); *p++ = htonl(timep->tv_nsec);
return p; return p;
} }
static inline u32 * static inline __be32 *
xdr_decode_time3(u32 *p, struct timespec *timep) xdr_decode_time3(__be32 *p, struct timespec *timep)
{ {
timep->tv_sec = ntohl(*p++); timep->tv_sec = ntohl(*p++);
timep->tv_nsec = ntohl(*p++); timep->tv_nsec = ntohl(*p++);
return p; return p;
} }
static u32 * static __be32 *
xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) xdr_decode_fattr(__be32 *p, struct nfs_fattr *fattr)
{ {
unsigned int type, major, minor; unsigned int type, major, minor;
int fmode; int fmode;
...@@ -177,8 +177,8 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) ...@@ -177,8 +177,8 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr)
return p; return p;
} }
static inline u32 * static inline __be32 *
xdr_encode_sattr(u32 *p, struct iattr *attr) xdr_encode_sattr(__be32 *p, struct iattr *attr)
{ {
if (attr->ia_valid & ATTR_MODE) { if (attr->ia_valid & ATTR_MODE) {
*p++ = xdr_one; *p++ = xdr_one;
...@@ -223,8 +223,8 @@ xdr_encode_sattr(u32 *p, struct iattr *attr) ...@@ -223,8 +223,8 @@ xdr_encode_sattr(u32 *p, struct iattr *attr)
return p; return p;
} }
static inline u32 * static inline __be32 *
xdr_decode_wcc_attr(u32 *p, struct nfs_fattr *fattr) xdr_decode_wcc_attr(__be32 *p, struct nfs_fattr *fattr)
{ {
p = xdr_decode_hyper(p, &fattr->pre_size); p = xdr_decode_hyper(p, &fattr->pre_size);
p = xdr_decode_time3(p, &fattr->pre_mtime); p = xdr_decode_time3(p, &fattr->pre_mtime);
...@@ -233,16 +233,16 @@ xdr_decode_wcc_attr(u32 *p, struct nfs_fattr *fattr) ...@@ -233,16 +233,16 @@ xdr_decode_wcc_attr(u32 *p, struct nfs_fattr *fattr)
return p; return p;
} }
static inline u32 * static inline __be32 *
xdr_decode_post_op_attr(u32 *p, struct nfs_fattr *fattr) xdr_decode_post_op_attr(__be32 *p, struct nfs_fattr *fattr)
{ {
if (*p++) if (*p++)
p = xdr_decode_fattr(p, fattr); p = xdr_decode_fattr(p, fattr);
return p; return p;
} }
static inline u32 * static inline __be32 *
xdr_decode_pre_op_attr(u32 *p, struct nfs_fattr *fattr) xdr_decode_pre_op_attr(__be32 *p, struct nfs_fattr *fattr)
{ {
if (*p++) if (*p++)
return xdr_decode_wcc_attr(p, fattr); return xdr_decode_wcc_attr(p, fattr);
...@@ -250,8 +250,8 @@ xdr_decode_pre_op_attr(u32 *p, struct nfs_fattr *fattr) ...@@ -250,8 +250,8 @@ xdr_decode_pre_op_attr(u32 *p, struct nfs_fattr *fattr)
} }
static inline u32 * static inline __be32 *
xdr_decode_wcc_data(u32 *p, struct nfs_fattr *fattr) xdr_decode_wcc_data(__be32 *p, struct nfs_fattr *fattr)
{ {
p = xdr_decode_pre_op_attr(p, fattr); p = xdr_decode_pre_op_attr(p, fattr);
return xdr_decode_post_op_attr(p, fattr); return xdr_decode_post_op_attr(p, fattr);
...@@ -265,7 +265,7 @@ xdr_decode_wcc_data(u32 *p, struct nfs_fattr *fattr) ...@@ -265,7 +265,7 @@ xdr_decode_wcc_data(u32 *p, struct nfs_fattr *fattr)
* Encode file handle argument * Encode file handle argument
*/ */
static int static int
nfs3_xdr_fhandle(struct rpc_rqst *req, u32 *p, struct nfs_fh *fh) nfs3_xdr_fhandle(struct rpc_rqst *req, __be32 *p, struct nfs_fh *fh)
{ {
p = xdr_encode_fhandle(p, fh); p = xdr_encode_fhandle(p, fh);
req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); req->rq_slen = xdr_adjust_iovec(req->rq_svec, p);
...@@ -276,7 +276,7 @@ nfs3_xdr_fhandle(struct rpc_rqst *req, u32 *p, struct nfs_fh *fh) ...@@ -276,7 +276,7 @@ nfs3_xdr_fhandle(struct rpc_rqst *req, u32 *p, struct nfs_fh *fh)
* Encode SETATTR arguments * Encode SETATTR arguments
*/ */
static int static int
nfs3_xdr_sattrargs(struct rpc_rqst *req, u32 *p, struct nfs3_sattrargs *args) nfs3_xdr_sattrargs(struct rpc_rqst *req, __be32 *p, struct nfs3_sattrargs *args)
{ {
p = xdr_encode_fhandle(p, args->fh); p = xdr_encode_fhandle(p, args->fh);
p = xdr_encode_sattr(p, args->sattr); p = xdr_encode_sattr(p, args->sattr);
...@@ -291,7 +291,7 @@ nfs3_xdr_sattrargs(struct rpc_rqst *req, u32 *p, struct nfs3_sattrargs *args) ...@@ -291,7 +291,7 @@ nfs3_xdr_sattrargs(struct rpc_rqst *req, u32 *p, struct nfs3_sattrargs *args)
* Encode directory ops argument * Encode directory ops argument
*/ */
static int static int
nfs3_xdr_diropargs(struct rpc_rqst *req, u32 *p, struct nfs3_diropargs *args) nfs3_xdr_diropargs(struct rpc_rqst *req, __be32 *p, struct nfs3_diropargs *args)
{ {
p = xdr_encode_fhandle(p, args->fh); p = xdr_encode_fhandle(p, args->fh);
p = xdr_encode_array(p, args->name, args->len); p = xdr_encode_array(p, args->name, args->len);
...@@ -303,7 +303,7 @@ nfs3_xdr_diropargs(struct rpc_rqst *req, u32 *p, struct nfs3_diropargs *args) ...@@ -303,7 +303,7 @@ nfs3_xdr_diropargs(struct rpc_rqst *req, u32 *p, struct nfs3_diropargs *args)
* Encode access() argument * Encode access() argument
*/ */
static int static int
nfs3_xdr_accessargs(struct rpc_rqst *req, u32 *p, struct nfs3_accessargs *args) nfs3_xdr_accessargs(struct rpc_rqst *req, __be32 *p, struct nfs3_accessargs *args)
{ {
p = xdr_encode_fhandle(p, args->fh); p = xdr_encode_fhandle(p, args->fh);
*p++ = htonl(args->access); *p++ = htonl(args->access);
...@@ -317,7 +317,7 @@ nfs3_xdr_accessargs(struct rpc_rqst *req, u32 *p, struct nfs3_accessargs *args) ...@@ -317,7 +317,7 @@ nfs3_xdr_accessargs(struct rpc_rqst *req, u32 *p, struct nfs3_accessargs *args)
* exactly to the page we want to fetch. * exactly to the page we want to fetch.
*/ */
static int static int
nfs3_xdr_readargs(struct rpc_rqst *req, u32 *p, struct nfs_readargs *args) nfs3_xdr_readargs(struct rpc_rqst *req, __be32 *p, struct nfs_readargs *args)
{ {
struct rpc_auth *auth = req->rq_task->tk_auth; struct rpc_auth *auth = req->rq_task->tk_auth;
unsigned int replen; unsigned int replen;
...@@ -339,7 +339,7 @@ nfs3_xdr_readargs(struct rpc_rqst *req, u32 *p, struct nfs_readargs *args) ...@@ -339,7 +339,7 @@ nfs3_xdr_readargs(struct rpc_rqst *req, u32 *p, struct nfs_readargs *args)
* Write arguments. Splice the buffer to be written into the iovec. * Write arguments. Splice the buffer to be written into the iovec.
*/ */
static int static int
nfs3_xdr_writeargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args) nfs3_xdr_writeargs(struct rpc_rqst *req, __be32 *p, struct nfs_writeargs *args)
{ {
struct xdr_buf *sndbuf = &req->rq_snd_buf; struct xdr_buf *sndbuf = &req->rq_snd_buf;
u32 count = args->count; u32 count = args->count;
...@@ -360,7 +360,7 @@ nfs3_xdr_writeargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args) ...@@ -360,7 +360,7 @@ nfs3_xdr_writeargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args)
* Encode CREATE arguments * Encode CREATE arguments
*/ */
static int static int
nfs3_xdr_createargs(struct rpc_rqst *req, u32 *p, struct nfs3_createargs *args) nfs3_xdr_createargs(struct rpc_rqst *req, __be32 *p, struct nfs3_createargs *args)
{ {
p = xdr_encode_fhandle(p, args->fh); p = xdr_encode_fhandle(p, args->fh);
p = xdr_encode_array(p, args->name, args->len); p = xdr_encode_array(p, args->name, args->len);
...@@ -380,7 +380,7 @@ nfs3_xdr_createargs(struct rpc_rqst *req, u32 *p, struct nfs3_createargs *args) ...@@ -380,7 +380,7 @@ nfs3_xdr_createargs(struct rpc_rqst *req, u32 *p, struct nfs3_createargs *args)
* Encode MKDIR arguments * Encode MKDIR arguments
*/ */
static int static int
nfs3_xdr_mkdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_mkdirargs *args) nfs3_xdr_mkdirargs(struct rpc_rqst *req, __be32 *p, struct nfs3_mkdirargs *args)
{ {
p = xdr_encode_fhandle(p, args->fh); p = xdr_encode_fhandle(p, args->fh);
p = xdr_encode_array(p, args->name, args->len); p = xdr_encode_array(p, args->name, args->len);
...@@ -393,7 +393,7 @@ nfs3_xdr_mkdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_mkdirargs *args) ...@@ -393,7 +393,7 @@ nfs3_xdr_mkdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_mkdirargs *args)
* Encode SYMLINK arguments * Encode SYMLINK arguments
*/ */
static int static int
nfs3_xdr_symlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_symlinkargs *args) nfs3_xdr_symlinkargs(struct rpc_rqst *req, __be32 *p, struct nfs3_symlinkargs *args)
{ {
p = xdr_encode_fhandle(p, args->fromfh); p = xdr_encode_fhandle(p, args->fromfh);
p = xdr_encode_array(p, args->fromname, args->fromlen); p = xdr_encode_array(p, args->fromname, args->fromlen);
...@@ -410,7 +410,7 @@ nfs3_xdr_symlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_symlinkargs *args ...@@ -410,7 +410,7 @@ nfs3_xdr_symlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_symlinkargs *args
* Encode MKNOD arguments * Encode MKNOD arguments
*/ */
static int static int
nfs3_xdr_mknodargs(struct rpc_rqst *req, u32 *p, struct nfs3_mknodargs *args) nfs3_xdr_mknodargs(struct rpc_rqst *req, __be32 *p, struct nfs3_mknodargs *args)
{ {
p = xdr_encode_fhandle(p, args->fh); p = xdr_encode_fhandle(p, args->fh);
p = xdr_encode_array(p, args->name, args->len); p = xdr_encode_array(p, args->name, args->len);
...@@ -429,7 +429,7 @@ nfs3_xdr_mknodargs(struct rpc_rqst *req, u32 *p, struct nfs3_mknodargs *args) ...@@ -429,7 +429,7 @@ nfs3_xdr_mknodargs(struct rpc_rqst *req, u32 *p, struct nfs3_mknodargs *args)
* Encode RENAME arguments * Encode RENAME arguments
*/ */
static int static int
nfs3_xdr_renameargs(struct rpc_rqst *req, u32 *p, struct nfs3_renameargs *args) nfs3_xdr_renameargs(struct rpc_rqst *req, __be32 *p, struct nfs3_renameargs *args)
{ {
p = xdr_encode_fhandle(p, args->fromfh); p = xdr_encode_fhandle(p, args->fromfh);
p = xdr_encode_array(p, args->fromname, args->fromlen); p = xdr_encode_array(p, args->fromname, args->fromlen);
...@@ -443,7 +443,7 @@ nfs3_xdr_renameargs(struct rpc_rqst *req, u32 *p, struct nfs3_renameargs *args) ...@@ -443,7 +443,7 @@ nfs3_xdr_renameargs(struct rpc_rqst *req, u32 *p, struct nfs3_renameargs *args)
* Encode LINK arguments * Encode LINK arguments
*/ */
static int static int
nfs3_xdr_linkargs(struct rpc_rqst *req, u32 *p, struct nfs3_linkargs *args) nfs3_xdr_linkargs(struct rpc_rqst *req, __be32 *p, struct nfs3_linkargs *args)
{ {
p = xdr_encode_fhandle(p, args->fromfh); p = xdr_encode_fhandle(p, args->fromfh);
p = xdr_encode_fhandle(p, args->tofh); p = xdr_encode_fhandle(p, args->tofh);
...@@ -456,7 +456,7 @@ nfs3_xdr_linkargs(struct rpc_rqst *req, u32 *p, struct nfs3_linkargs *args) ...@@ -456,7 +456,7 @@ nfs3_xdr_linkargs(struct rpc_rqst *req, u32 *p, struct nfs3_linkargs *args)
* Encode arguments to readdir call * Encode arguments to readdir call
*/ */
static int static int
nfs3_xdr_readdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_readdirargs *args) nfs3_xdr_readdirargs(struct rpc_rqst *req, __be32 *p, struct nfs3_readdirargs *args)
{ {
struct rpc_auth *auth = req->rq_task->tk_auth; struct rpc_auth *auth = req->rq_task->tk_auth;
unsigned int replen; unsigned int replen;
...@@ -485,7 +485,7 @@ nfs3_xdr_readdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_readdirargs *args ...@@ -485,7 +485,7 @@ nfs3_xdr_readdirargs(struct rpc_rqst *req, u32 *p, struct nfs3_readdirargs *args
* We just check for syntactical correctness. * We just check for syntactical correctness.
*/ */
static int static int
nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res) nfs3_xdr_readdirres(struct rpc_rqst *req, __be32 *p, struct nfs3_readdirres *res)
{ {
struct xdr_buf *rcvbuf = &req->rq_rcv_buf; struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
struct kvec *iov = rcvbuf->head; struct kvec *iov = rcvbuf->head;
...@@ -493,7 +493,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res) ...@@ -493,7 +493,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res)
int hdrlen, recvd; int hdrlen, recvd;
int status, nr; int status, nr;
unsigned int len, pglen; unsigned int len, pglen;
u32 *entry, *end, *kaddr; __be32 *entry, *end, *kaddr;
status = ntohl(*p++); status = ntohl(*p++);
/* Decode post_op_attrs */ /* Decode post_op_attrs */
...@@ -523,8 +523,8 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res) ...@@ -523,8 +523,8 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, u32 *p, struct nfs3_readdirres *res)
if (pglen > recvd) if (pglen > recvd)
pglen = recvd; pglen = recvd;
page = rcvbuf->pages; page = rcvbuf->pages;
kaddr = p = (u32 *)kmap_atomic(*page, KM_USER0); kaddr = p = kmap_atomic(*page, KM_USER0);
end = (u32 *)((char *)p + pglen); end = (__be32 *)((char *)p + pglen);
entry = p; entry = p;
for (nr = 0; *p++; nr++) { for (nr = 0; *p++; nr++) {
if (p + 3 > end) if (p + 3 > end)
...@@ -626,7 +626,7 @@ nfs3_decode_dirent(u32 *p, struct nfs_entry *entry, int plus) ...@@ -626,7 +626,7 @@ nfs3_decode_dirent(u32 *p, struct nfs_entry *entry, int plus)
* Encode COMMIT arguments * Encode COMMIT arguments
*/ */
static int static int
nfs3_xdr_commitargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args) nfs3_xdr_commitargs(struct rpc_rqst *req, __be32 *p, struct nfs_writeargs *args)
{ {
p = xdr_encode_fhandle(p, args->fh); p = xdr_encode_fhandle(p, args->fh);
p = xdr_encode_hyper(p, args->offset); p = xdr_encode_hyper(p, args->offset);
...@@ -640,7 +640,7 @@ nfs3_xdr_commitargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args) ...@@ -640,7 +640,7 @@ nfs3_xdr_commitargs(struct rpc_rqst *req, u32 *p, struct nfs_writeargs *args)
* Encode GETACL arguments * Encode GETACL arguments
*/ */
static int static int
nfs3_xdr_getaclargs(struct rpc_rqst *req, u32 *p, nfs3_xdr_getaclargs(struct rpc_rqst *req, __be32 *p,
struct nfs3_getaclargs *args) struct nfs3_getaclargs *args)
{ {
struct rpc_auth *auth = req->rq_task->tk_auth; struct rpc_auth *auth = req->rq_task->tk_auth;
...@@ -664,7 +664,7 @@ nfs3_xdr_getaclargs(struct rpc_rqst *req, u32 *p, ...@@ -664,7 +664,7 @@ nfs3_xdr_getaclargs(struct rpc_rqst *req, u32 *p,
* Encode SETACL arguments * Encode SETACL arguments
*/ */
static int static int
nfs3_xdr_setaclargs(struct rpc_rqst *req, u32 *p, nfs3_xdr_setaclargs(struct rpc_rqst *req, __be32 *p,
struct nfs3_setaclargs *args) struct nfs3_setaclargs *args)
{ {
struct xdr_buf *buf = &req->rq_snd_buf; struct xdr_buf *buf = &req->rq_snd_buf;
...@@ -711,7 +711,7 @@ nfs3_xdr_setaclargs(struct rpc_rqst *req, u32 *p, ...@@ -711,7 +711,7 @@ nfs3_xdr_setaclargs(struct rpc_rqst *req, u32 *p,
* Decode attrstat reply. * Decode attrstat reply.
*/ */
static int static int
nfs3_xdr_attrstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) nfs3_xdr_attrstat(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr)
{ {
int status; int status;
...@@ -726,7 +726,7 @@ nfs3_xdr_attrstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) ...@@ -726,7 +726,7 @@ nfs3_xdr_attrstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr)
* SATTR, REMOVE, RMDIR * SATTR, REMOVE, RMDIR
*/ */
static int static int
nfs3_xdr_wccstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) nfs3_xdr_wccstat(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr)
{ {
int status; int status;
...@@ -740,7 +740,7 @@ nfs3_xdr_wccstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) ...@@ -740,7 +740,7 @@ nfs3_xdr_wccstat(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr)
* Decode LOOKUP reply * Decode LOOKUP reply
*/ */
static int static int
nfs3_xdr_lookupres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res) nfs3_xdr_lookupres(struct rpc_rqst *req, __be32 *p, struct nfs3_diropres *res)
{ {
int status; int status;
...@@ -759,7 +759,7 @@ nfs3_xdr_lookupres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res) ...@@ -759,7 +759,7 @@ nfs3_xdr_lookupres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res)
* Decode ACCESS reply * Decode ACCESS reply
*/ */
static int static int
nfs3_xdr_accessres(struct rpc_rqst *req, u32 *p, struct nfs3_accessres *res) nfs3_xdr_accessres(struct rpc_rqst *req, __be32 *p, struct nfs3_accessres *res)
{ {
int status = ntohl(*p++); int status = ntohl(*p++);
...@@ -771,7 +771,7 @@ nfs3_xdr_accessres(struct rpc_rqst *req, u32 *p, struct nfs3_accessres *res) ...@@ -771,7 +771,7 @@ nfs3_xdr_accessres(struct rpc_rqst *req, u32 *p, struct nfs3_accessres *res)
} }
static int static int
nfs3_xdr_readlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_readlinkargs *args) nfs3_xdr_readlinkargs(struct rpc_rqst *req, __be32 *p, struct nfs3_readlinkargs *args)
{ {
struct rpc_auth *auth = req->rq_task->tk_auth; struct rpc_auth *auth = req->rq_task->tk_auth;
unsigned int replen; unsigned int replen;
...@@ -789,7 +789,7 @@ nfs3_xdr_readlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_readlinkargs *ar ...@@ -789,7 +789,7 @@ nfs3_xdr_readlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_readlinkargs *ar
* Decode READLINK reply * Decode READLINK reply
*/ */
static int static int
nfs3_xdr_readlinkres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) nfs3_xdr_readlinkres(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr)
{ {
struct xdr_buf *rcvbuf = &req->rq_rcv_buf; struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
struct kvec *iov = rcvbuf->head; struct kvec *iov = rcvbuf->head;
...@@ -837,7 +837,7 @@ nfs3_xdr_readlinkres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) ...@@ -837,7 +837,7 @@ nfs3_xdr_readlinkres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr)
* Decode READ reply * Decode READ reply
*/ */
static int static int
nfs3_xdr_readres(struct rpc_rqst *req, u32 *p, struct nfs_readres *res) nfs3_xdr_readres(struct rpc_rqst *req, __be32 *p, struct nfs_readres *res)
{ {
struct kvec *iov = req->rq_rcv_buf.head; struct kvec *iov = req->rq_rcv_buf.head;
int status, count, ocount, recvd, hdrlen; int status, count, ocount, recvd, hdrlen;
...@@ -888,7 +888,7 @@ nfs3_xdr_readres(struct rpc_rqst *req, u32 *p, struct nfs_readres *res) ...@@ -888,7 +888,7 @@ nfs3_xdr_readres(struct rpc_rqst *req, u32 *p, struct nfs_readres *res)
* Decode WRITE response * Decode WRITE response
*/ */
static int static int
nfs3_xdr_writeres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res) nfs3_xdr_writeres(struct rpc_rqst *req, __be32 *p, struct nfs_writeres *res)
{ {
int status; int status;
...@@ -910,7 +910,7 @@ nfs3_xdr_writeres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res) ...@@ -910,7 +910,7 @@ nfs3_xdr_writeres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res)
* Decode a CREATE response * Decode a CREATE response
*/ */
static int static int
nfs3_xdr_createres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res) nfs3_xdr_createres(struct rpc_rqst *req, __be32 *p, struct nfs3_diropres *res)
{ {
int status; int status;
...@@ -937,7 +937,7 @@ nfs3_xdr_createres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res) ...@@ -937,7 +937,7 @@ nfs3_xdr_createres(struct rpc_rqst *req, u32 *p, struct nfs3_diropres *res)
* Decode RENAME reply * Decode RENAME reply
*/ */
static int static int
nfs3_xdr_renameres(struct rpc_rqst *req, u32 *p, struct nfs3_renameres *res) nfs3_xdr_renameres(struct rpc_rqst *req, __be32 *p, struct nfs3_renameres *res)
{ {
int status; int status;
...@@ -952,7 +952,7 @@ nfs3_xdr_renameres(struct rpc_rqst *req, u32 *p, struct nfs3_renameres *res) ...@@ -952,7 +952,7 @@ nfs3_xdr_renameres(struct rpc_rqst *req, u32 *p, struct nfs3_renameres *res)
* Decode LINK reply * Decode LINK reply
*/ */
static int static int
nfs3_xdr_linkres(struct rpc_rqst *req, u32 *p, struct nfs3_linkres *res) nfs3_xdr_linkres(struct rpc_rqst *req, __be32 *p, struct nfs3_linkres *res)
{ {
int status; int status;
...@@ -967,7 +967,7 @@ nfs3_xdr_linkres(struct rpc_rqst *req, u32 *p, struct nfs3_linkres *res) ...@@ -967,7 +967,7 @@ nfs3_xdr_linkres(struct rpc_rqst *req, u32 *p, struct nfs3_linkres *res)
* Decode FSSTAT reply * Decode FSSTAT reply
*/ */
static int static int
nfs3_xdr_fsstatres(struct rpc_rqst *req, u32 *p, struct nfs_fsstat *res) nfs3_xdr_fsstatres(struct rpc_rqst *req, __be32 *p, struct nfs_fsstat *res)
{ {
int status; int status;
...@@ -992,7 +992,7 @@ nfs3_xdr_fsstatres(struct rpc_rqst *req, u32 *p, struct nfs_fsstat *res) ...@@ -992,7 +992,7 @@ nfs3_xdr_fsstatres(struct rpc_rqst *req, u32 *p, struct nfs_fsstat *res)
* Decode FSINFO reply * Decode FSINFO reply
*/ */
static int static int
nfs3_xdr_fsinfores(struct rpc_rqst *req, u32 *p, struct nfs_fsinfo *res) nfs3_xdr_fsinfores(struct rpc_rqst *req, __be32 *p, struct nfs_fsinfo *res)
{ {
int status; int status;
...@@ -1020,7 +1020,7 @@ nfs3_xdr_fsinfores(struct rpc_rqst *req, u32 *p, struct nfs_fsinfo *res) ...@@ -1020,7 +1020,7 @@ nfs3_xdr_fsinfores(struct rpc_rqst *req, u32 *p, struct nfs_fsinfo *res)
* Decode PATHCONF reply * Decode PATHCONF reply
*/ */
static int static int
nfs3_xdr_pathconfres(struct rpc_rqst *req, u32 *p, struct nfs_pathconf *res) nfs3_xdr_pathconfres(struct rpc_rqst *req, __be32 *p, struct nfs_pathconf *res)
{ {
int status; int status;
...@@ -1040,7 +1040,7 @@ nfs3_xdr_pathconfres(struct rpc_rqst *req, u32 *p, struct nfs_pathconf *res) ...@@ -1040,7 +1040,7 @@ nfs3_xdr_pathconfres(struct rpc_rqst *req, u32 *p, struct nfs_pathconf *res)
* Decode COMMIT reply * Decode COMMIT reply
*/ */
static int static int
nfs3_xdr_commitres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res) nfs3_xdr_commitres(struct rpc_rqst *req, __be32 *p, struct nfs_writeres *res)
{ {
int status; int status;
...@@ -1059,7 +1059,7 @@ nfs3_xdr_commitres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res) ...@@ -1059,7 +1059,7 @@ nfs3_xdr_commitres(struct rpc_rqst *req, u32 *p, struct nfs_writeres *res)
* Decode GETACL reply * Decode GETACL reply
*/ */
static int static int
nfs3_xdr_getaclres(struct rpc_rqst *req, u32 *p, nfs3_xdr_getaclres(struct rpc_rqst *req, __be32 *p,
struct nfs3_getaclres *res) struct nfs3_getaclres *res)
{ {
struct xdr_buf *buf = &req->rq_rcv_buf; struct xdr_buf *buf = &req->rq_rcv_buf;
...@@ -1091,7 +1091,7 @@ nfs3_xdr_getaclres(struct rpc_rqst *req, u32 *p, ...@@ -1091,7 +1091,7 @@ nfs3_xdr_getaclres(struct rpc_rqst *req, u32 *p,
* Decode setacl reply. * Decode setacl reply.
*/ */
static int static int
nfs3_xdr_setaclres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) nfs3_xdr_setaclres(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr)
{ {
int status = ntohl(*p++); int status = ntohl(*p++);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册