Commit 52921e02 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] lockd endianness annotations

Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Acked-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7111c66e
...@@ -100,12 +100,12 @@ int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout) ...@@ -100,12 +100,12 @@ int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout)
/* /*
* The server lockd has called us back to tell us the lock was granted * The server lockd has called us back to tell us the lock was granted
*/ */
u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock) __be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock)
{ {
const struct file_lock *fl = &lock->fl; const struct file_lock *fl = &lock->fl;
const struct nfs_fh *fh = &lock->fh; const struct nfs_fh *fh = &lock->fh;
struct nlm_wait *block; struct nlm_wait *block;
u32 res = nlm_lck_denied; __be32 res = nlm_lck_denied;
/* /*
* Look up blocked request based on arguments. * Look up blocked request based on arguments.
......
...@@ -148,8 +148,8 @@ nsm_create(void) ...@@ -148,8 +148,8 @@ nsm_create(void)
* XDR functions for NSM. * XDR functions for NSM.
*/ */
static u32 * static __be32 *
xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) xdr_encode_common(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp)
{ {
char buffer[20], *name; char buffer[20], *name;
...@@ -176,7 +176,7 @@ xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) ...@@ -176,7 +176,7 @@ xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
} }
static int static int
xdr_encode_mon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) xdr_encode_mon(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp)
{ {
p = xdr_encode_common(rqstp, p, argp); p = xdr_encode_common(rqstp, p, argp);
if (IS_ERR(p)) if (IS_ERR(p))
...@@ -192,7 +192,7 @@ xdr_encode_mon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) ...@@ -192,7 +192,7 @@ xdr_encode_mon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
} }
static int static int
xdr_encode_unmon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) xdr_encode_unmon(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp)
{ {
p = xdr_encode_common(rqstp, p, argp); p = xdr_encode_common(rqstp, p, argp);
if (IS_ERR(p)) if (IS_ERR(p))
...@@ -202,7 +202,7 @@ xdr_encode_unmon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) ...@@ -202,7 +202,7 @@ xdr_encode_unmon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp)
} }
static int static int
xdr_decode_stat_res(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp) xdr_decode_stat_res(struct rpc_rqst *rqstp, __be32 *p, struct nsm_res *resp)
{ {
resp->status = ntohl(*p++); resp->status = ntohl(*p++);
resp->state = ntohl(*p++); resp->state = ntohl(*p++);
...@@ -212,7 +212,7 @@ xdr_decode_stat_res(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp) ...@@ -212,7 +212,7 @@ xdr_decode_stat_res(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp)
} }
static int static int
xdr_decode_stat(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp) xdr_decode_stat(struct rpc_rqst *rqstp, __be32 *p, struct nsm_res *resp)
{ {
resp->state = ntohl(*p++); resp->state = ntohl(*p++);
return 0; return 0;
......
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
/* /*
* Obtain client and file from arguments * Obtain client and file from arguments
*/ */
static u32 static __be32
nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
struct nlm_host **hostp, struct nlm_file **filp) struct nlm_host **hostp, struct nlm_file **filp)
{ {
struct nlm_host *host = NULL; struct nlm_host *host = NULL;
struct nlm_file *file = NULL; struct nlm_file *file = NULL;
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
u32 error = 0; __be32 error = 0;
/* nfsd callbacks must have been installed for this procedure */ /* nfsd callbacks must have been installed for this procedure */
if (!nlmsvc_ops) if (!nlmsvc_ops)
......
...@@ -334,13 +334,13 @@ static void nlmsvc_freegrantargs(struct nlm_rqst *call) ...@@ -334,13 +334,13 @@ static void nlmsvc_freegrantargs(struct nlm_rqst *call)
* Attempt to establish a lock, and if it can't be granted, block it * Attempt to establish a lock, and if it can't be granted, block it
* if required. * if required.
*/ */
u32 __be32
nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file, nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
struct nlm_lock *lock, int wait, struct nlm_cookie *cookie) struct nlm_lock *lock, int wait, struct nlm_cookie *cookie)
{ {
struct nlm_block *block, *newblock = NULL; struct nlm_block *block, *newblock = NULL;
int error; int error;
u32 ret; __be32 ret;
dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n", dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n",
file->f_file->f_dentry->d_inode->i_sb->s_id, file->f_file->f_dentry->d_inode->i_sb->s_id,
...@@ -415,7 +415,7 @@ out: ...@@ -415,7 +415,7 @@ out:
/* /*
* Test for presence of a conflicting lock. * Test for presence of a conflicting lock.
*/ */
u32 __be32
nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock, nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock,
struct nlm_lock *conflock) struct nlm_lock *conflock)
{ {
...@@ -448,7 +448,7 @@ nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock, ...@@ -448,7 +448,7 @@ nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock,
* afterwards. In this case the block will still be there, and hence * afterwards. In this case the block will still be there, and hence
* must be removed. * must be removed.
*/ */
u32 __be32
nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock) nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock)
{ {
int error; int error;
...@@ -476,7 +476,7 @@ nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock) ...@@ -476,7 +476,7 @@ nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock)
* be in progress. * be in progress.
* The calling procedure must check whether the file can be closed. * The calling procedure must check whether the file can be closed.
*/ */
u32 __be32
nlmsvc_cancel_blocked(struct nlm_file *file, struct nlm_lock *lock) nlmsvc_cancel_blocked(struct nlm_file *file, struct nlm_lock *lock)
{ {
struct nlm_block *block; struct nlm_block *block;
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
#define NLMDBG_FACILITY NLMDBG_CLIENT #define NLMDBG_FACILITY NLMDBG_CLIENT
#ifdef CONFIG_LOCKD_V4 #ifdef CONFIG_LOCKD_V4
static u32 static __be32
cast_to_nlm(u32 status, u32 vers) cast_to_nlm(__be32 status, u32 vers)
{ {
/* Note: status is assumed to be in network byte order !!! */ /* Note: status is assumed to be in network byte order !!! */
if (vers != 4){ if (vers != 4){
...@@ -52,14 +52,14 @@ cast_to_nlm(u32 status, u32 vers) ...@@ -52,14 +52,14 @@ cast_to_nlm(u32 status, u32 vers)
/* /*
* Obtain client and file from arguments * Obtain client and file from arguments
*/ */
static u32 static __be32
nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
struct nlm_host **hostp, struct nlm_file **filp) struct nlm_host **hostp, struct nlm_file **filp)
{ {
struct nlm_host *host = NULL; struct nlm_host *host = NULL;
struct nlm_file *file = NULL; struct nlm_file *file = NULL;
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
u32 error = 0; __be32 error = 0;
/* nfsd callbacks must have been installed for this procedure */ /* nfsd callbacks must have been installed for this procedure */
if (!nlmsvc_ops) if (!nlmsvc_ops)
......
...@@ -23,7 +23,7 @@ nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh) ...@@ -23,7 +23,7 @@ nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh)
&& !memcmp(share->s_owner.data, oh->data, oh->len); && !memcmp(share->s_owner.data, oh->data, oh->len);
} }
u32 __be32
nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file, nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
struct nlm_args *argp) struct nlm_args *argp)
{ {
...@@ -64,7 +64,7 @@ update: ...@@ -64,7 +64,7 @@ update:
/* /*
* Delete a share. * Delete a share.
*/ */
u32 __be32
nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file, nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
struct nlm_args *argp) struct nlm_args *argp)
{ {
......
...@@ -78,14 +78,14 @@ static inline unsigned int file_hash(struct nfs_fh *f) ...@@ -78,14 +78,14 @@ static inline unsigned int file_hash(struct nfs_fh *f)
* This is not quite right, but for now, we assume the client performs * This is not quite right, but for now, we assume the client performs
* the proper R/W checking. * the proper R/W checking.
*/ */
u32 __be32
nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
struct nfs_fh *f) struct nfs_fh *f)
{ {
struct hlist_node *pos; struct hlist_node *pos;
struct nlm_file *file; struct nlm_file *file;
unsigned int hash; unsigned int hash;
u32 nfserr; __be32 nfserr;
nlm_debug_print_fh("nlm_file_lookup", f); nlm_debug_print_fh("nlm_file_lookup", f);
......
...@@ -43,7 +43,7 @@ loff_t_to_s32(loff_t offset) ...@@ -43,7 +43,7 @@ loff_t_to_s32(loff_t offset)
/* /*
* XDR functions for basic NLM types * XDR functions for basic NLM types
*/ */
static u32 *nlm_decode_cookie(u32 *p, struct nlm_cookie *c) static __be32 *nlm_decode_cookie(__be32 *p, struct nlm_cookie *c)
{ {
unsigned int len; unsigned int len;
...@@ -69,8 +69,8 @@ static u32 *nlm_decode_cookie(u32 *p, struct nlm_cookie *c) ...@@ -69,8 +69,8 @@ static u32 *nlm_decode_cookie(u32 *p, struct nlm_cookie *c)
return p; return p;
} }
static inline u32 * static inline __be32 *
nlm_encode_cookie(u32 *p, struct nlm_cookie *c) nlm_encode_cookie(__be32 *p, struct nlm_cookie *c)
{ {
*p++ = htonl(c->len); *p++ = htonl(c->len);
memcpy(p, c->data, c->len); memcpy(p, c->data, c->len);
...@@ -78,8 +78,8 @@ nlm_encode_cookie(u32 *p, struct nlm_cookie *c) ...@@ -78,8 +78,8 @@ nlm_encode_cookie(u32 *p, struct nlm_cookie *c)
return p; return p;
} }
static u32 * static __be32 *
nlm_decode_fh(u32 *p, struct nfs_fh *f) nlm_decode_fh(__be32 *p, struct nfs_fh *f)
{ {
unsigned int len; unsigned int len;
...@@ -95,8 +95,8 @@ nlm_decode_fh(u32 *p, struct nfs_fh *f) ...@@ -95,8 +95,8 @@ nlm_decode_fh(u32 *p, struct nfs_fh *f)
return p + XDR_QUADLEN(NFS2_FHSIZE); return p + XDR_QUADLEN(NFS2_FHSIZE);
} }
static inline u32 * static inline __be32 *
nlm_encode_fh(u32 *p, struct nfs_fh *f) nlm_encode_fh(__be32 *p, struct nfs_fh *f)
{ {
*p++ = htonl(NFS2_FHSIZE); *p++ = htonl(NFS2_FHSIZE);
memcpy(p, f->data, NFS2_FHSIZE); memcpy(p, f->data, NFS2_FHSIZE);
...@@ -106,20 +106,20 @@ nlm_encode_fh(u32 *p, struct nfs_fh *f) ...@@ -106,20 +106,20 @@ nlm_encode_fh(u32 *p, struct nfs_fh *f)
/* /*
* Encode and decode owner handle * Encode and decode owner handle
*/ */
static inline u32 * static inline __be32 *
nlm_decode_oh(u32 *p, struct xdr_netobj *oh) nlm_decode_oh(__be32 *p, struct xdr_netobj *oh)
{ {
return xdr_decode_netobj(p, oh); return xdr_decode_netobj(p, oh);
} }
static inline u32 * static inline __be32 *
nlm_encode_oh(u32 *p, struct xdr_netobj *oh) nlm_encode_oh(__be32 *p, struct xdr_netobj *oh)
{ {
return xdr_encode_netobj(p, oh); return xdr_encode_netobj(p, oh);
} }
static u32 * static __be32 *
nlm_decode_lock(u32 *p, struct nlm_lock *lock) nlm_decode_lock(__be32 *p, struct nlm_lock *lock)
{ {
struct file_lock *fl = &lock->fl; struct file_lock *fl = &lock->fl;
s32 start, len, end; s32 start, len, end;
...@@ -153,8 +153,8 @@ nlm_decode_lock(u32 *p, struct nlm_lock *lock) ...@@ -153,8 +153,8 @@ nlm_decode_lock(u32 *p, struct nlm_lock *lock)
/* /*
* Encode a lock as part of an NLM call * Encode a lock as part of an NLM call
*/ */
static u32 * static __be32 *
nlm_encode_lock(u32 *p, struct nlm_lock *lock) nlm_encode_lock(__be32 *p, struct nlm_lock *lock)
{ {
struct file_lock *fl = &lock->fl; struct file_lock *fl = &lock->fl;
__s32 start, len; __s32 start, len;
...@@ -184,8 +184,8 @@ nlm_encode_lock(u32 *p, struct nlm_lock *lock) ...@@ -184,8 +184,8 @@ nlm_encode_lock(u32 *p, struct nlm_lock *lock)
/* /*
* Encode result of a TEST/TEST_MSG call * Encode result of a TEST/TEST_MSG call
*/ */
static u32 * static __be32 *
nlm_encode_testres(u32 *p, struct nlm_res *resp) nlm_encode_testres(__be32 *p, struct nlm_res *resp)
{ {
s32 start, len; s32 start, len;
...@@ -221,7 +221,7 @@ nlm_encode_testres(u32 *p, struct nlm_res *resp) ...@@ -221,7 +221,7 @@ nlm_encode_testres(u32 *p, struct nlm_res *resp)
* First, the server side XDR functions * First, the server side XDR functions
*/ */
int int
nlmsvc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlmsvc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
u32 exclusive; u32 exclusive;
...@@ -238,7 +238,7 @@ nlmsvc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -238,7 +238,7 @@ nlmsvc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlmsvc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) nlmsvc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm_encode_testres(p, resp))) if (!(p = nlm_encode_testres(p, resp)))
return 0; return 0;
...@@ -246,7 +246,7 @@ nlmsvc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) ...@@ -246,7 +246,7 @@ nlmsvc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp)
} }
int int
nlmsvc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlmsvc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
u32 exclusive; u32 exclusive;
...@@ -266,7 +266,7 @@ nlmsvc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -266,7 +266,7 @@ nlmsvc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlmsvc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlmsvc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
u32 exclusive; u32 exclusive;
...@@ -282,7 +282,7 @@ nlmsvc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -282,7 +282,7 @@ nlmsvc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
if (!(p = nlm_decode_cookie(p, &argp->cookie)) if (!(p = nlm_decode_cookie(p, &argp->cookie))
|| !(p = nlm_decode_lock(p, &argp->lock))) || !(p = nlm_decode_lock(p, &argp->lock)))
...@@ -292,7 +292,7 @@ nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -292,7 +292,7 @@ nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlmsvc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -313,7 +313,7 @@ nlmsvc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -313,7 +313,7 @@ nlmsvc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlmsvc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm_encode_cookie(p, &resp->cookie))) if (!(p = nlm_encode_cookie(p, &resp->cookie)))
return 0; return 0;
...@@ -323,7 +323,7 @@ nlmsvc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) ...@@ -323,7 +323,7 @@ nlmsvc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp)
} }
int int
nlmsvc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm_encode_cookie(p, &resp->cookie))) if (!(p = nlm_encode_cookie(p, &resp->cookie)))
return 0; return 0;
...@@ -332,7 +332,7 @@ nlmsvc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) ...@@ -332,7 +332,7 @@ nlmsvc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp)
} }
int int
nlmsvc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp) nlmsvc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -344,7 +344,7 @@ nlmsvc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp) ...@@ -344,7 +344,7 @@ nlmsvc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp)
} }
int int
nlmsvc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp) nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp)
{ {
if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN)))
return 0; return 0;
...@@ -357,7 +357,7 @@ nlmsvc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp) ...@@ -357,7 +357,7 @@ nlmsvc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp)
} }
int int
nlmsvc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) nlmsvc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm_decode_cookie(p, &resp->cookie))) if (!(p = nlm_decode_cookie(p, &resp->cookie)))
return 0; return 0;
...@@ -366,13 +366,13 @@ nlmsvc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) ...@@ -366,13 +366,13 @@ nlmsvc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp)
} }
int int
nlmsvc_decode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) nlmsvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
{ {
return xdr_argsize_check(rqstp, p); return xdr_argsize_check(rqstp, p);
} }
int int
nlmsvc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) nlmsvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
{ {
return xdr_ressize_check(rqstp, p); return xdr_ressize_check(rqstp, p);
} }
...@@ -389,7 +389,7 @@ nlmclt_decode_void(struct rpc_rqst *req, u32 *p, void *ptr) ...@@ -389,7 +389,7 @@ nlmclt_decode_void(struct rpc_rqst *req, u32 *p, void *ptr)
#endif #endif
static int static int
nlmclt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) nlmclt_encode_testargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -403,7 +403,7 @@ nlmclt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) ...@@ -403,7 +403,7 @@ nlmclt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp)
} }
static int static int
nlmclt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) nlmclt_decode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm_decode_cookie(p, &resp->cookie))) if (!(p = nlm_decode_cookie(p, &resp->cookie)))
return -EIO; return -EIO;
...@@ -438,7 +438,7 @@ nlmclt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) ...@@ -438,7 +438,7 @@ nlmclt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp)
static int static int
nlmclt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) nlmclt_encode_lockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -455,7 +455,7 @@ nlmclt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) ...@@ -455,7 +455,7 @@ nlmclt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp)
} }
static int static int
nlmclt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) nlmclt_encode_cancargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -470,7 +470,7 @@ nlmclt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) ...@@ -470,7 +470,7 @@ nlmclt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp)
} }
static int static int
nlmclt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) nlmclt_encode_unlockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -483,7 +483,7 @@ nlmclt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) ...@@ -483,7 +483,7 @@ nlmclt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp)
} }
static int static int
nlmclt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) nlmclt_encode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm_encode_cookie(p, &resp->cookie))) if (!(p = nlm_encode_cookie(p, &resp->cookie)))
return -EIO; return -EIO;
...@@ -493,7 +493,7 @@ nlmclt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) ...@@ -493,7 +493,7 @@ nlmclt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp)
} }
static int static int
nlmclt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) nlmclt_encode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm_encode_testres(p, resp))) if (!(p = nlm_encode_testres(p, resp)))
return -EIO; return -EIO;
...@@ -502,7 +502,7 @@ nlmclt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) ...@@ -502,7 +502,7 @@ nlmclt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp)
} }
static int static int
nlmclt_decode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) nlmclt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm_decode_cookie(p, &resp->cookie))) if (!(p = nlm_decode_cookie(p, &resp->cookie)))
return -EIO; return -EIO;
......
...@@ -44,8 +44,8 @@ loff_t_to_s64(loff_t offset) ...@@ -44,8 +44,8 @@ loff_t_to_s64(loff_t offset)
/* /*
* XDR functions for basic NLM types * XDR functions for basic NLM types
*/ */
static u32 * static __be32 *
nlm4_decode_cookie(u32 *p, struct nlm_cookie *c) nlm4_decode_cookie(__be32 *p, struct nlm_cookie *c)
{ {
unsigned int len; unsigned int len;
...@@ -71,8 +71,8 @@ nlm4_decode_cookie(u32 *p, struct nlm_cookie *c) ...@@ -71,8 +71,8 @@ nlm4_decode_cookie(u32 *p, struct nlm_cookie *c)
return p; return p;
} }
static u32 * static __be32 *
nlm4_encode_cookie(u32 *p, struct nlm_cookie *c) nlm4_encode_cookie(__be32 *p, struct nlm_cookie *c)
{ {
*p++ = htonl(c->len); *p++ = htonl(c->len);
memcpy(p, c->data, c->len); memcpy(p, c->data, c->len);
...@@ -80,8 +80,8 @@ nlm4_encode_cookie(u32 *p, struct nlm_cookie *c) ...@@ -80,8 +80,8 @@ nlm4_encode_cookie(u32 *p, struct nlm_cookie *c)
return p; return p;
} }
static u32 * static __be32 *
nlm4_decode_fh(u32 *p, struct nfs_fh *f) nlm4_decode_fh(__be32 *p, struct nfs_fh *f)
{ {
memset(f->data, 0, sizeof(f->data)); memset(f->data, 0, sizeof(f->data));
f->size = ntohl(*p++); f->size = ntohl(*p++);
...@@ -95,8 +95,8 @@ nlm4_decode_fh(u32 *p, struct nfs_fh *f) ...@@ -95,8 +95,8 @@ nlm4_decode_fh(u32 *p, struct nfs_fh *f)
return p + XDR_QUADLEN(f->size); return p + XDR_QUADLEN(f->size);
} }
static u32 * static __be32 *
nlm4_encode_fh(u32 *p, struct nfs_fh *f) nlm4_encode_fh(__be32 *p, struct nfs_fh *f)
{ {
*p++ = htonl(f->size); *p++ = htonl(f->size);
if (f->size) p[XDR_QUADLEN(f->size)-1] = 0; /* don't leak anything */ if (f->size) p[XDR_QUADLEN(f->size)-1] = 0; /* don't leak anything */
...@@ -107,20 +107,20 @@ nlm4_encode_fh(u32 *p, struct nfs_fh *f) ...@@ -107,20 +107,20 @@ nlm4_encode_fh(u32 *p, struct nfs_fh *f)
/* /*
* Encode and decode owner handle * Encode and decode owner handle
*/ */
static u32 * static __be32 *
nlm4_decode_oh(u32 *p, struct xdr_netobj *oh) nlm4_decode_oh(__be32 *p, struct xdr_netobj *oh)
{ {
return xdr_decode_netobj(p, oh); return xdr_decode_netobj(p, oh);
} }
static u32 * static __be32 *
nlm4_encode_oh(u32 *p, struct xdr_netobj *oh) nlm4_encode_oh(__be32 *p, struct xdr_netobj *oh)
{ {
return xdr_encode_netobj(p, oh); return xdr_encode_netobj(p, oh);
} }
static u32 * static __be32 *
nlm4_decode_lock(u32 *p, struct nlm_lock *lock) nlm4_decode_lock(__be32 *p, struct nlm_lock *lock)
{ {
struct file_lock *fl = &lock->fl; struct file_lock *fl = &lock->fl;
__s64 len, start, end; __s64 len, start, end;
...@@ -153,8 +153,8 @@ nlm4_decode_lock(u32 *p, struct nlm_lock *lock) ...@@ -153,8 +153,8 @@ nlm4_decode_lock(u32 *p, struct nlm_lock *lock)
/* /*
* Encode a lock as part of an NLM call * Encode a lock as part of an NLM call
*/ */
static u32 * static __be32 *
nlm4_encode_lock(u32 *p, struct nlm_lock *lock) nlm4_encode_lock(__be32 *p, struct nlm_lock *lock)
{ {
struct file_lock *fl = &lock->fl; struct file_lock *fl = &lock->fl;
__s64 start, len; __s64 start, len;
...@@ -185,8 +185,8 @@ nlm4_encode_lock(u32 *p, struct nlm_lock *lock) ...@@ -185,8 +185,8 @@ nlm4_encode_lock(u32 *p, struct nlm_lock *lock)
/* /*
* Encode result of a TEST/TEST_MSG call * Encode result of a TEST/TEST_MSG call
*/ */
static u32 * static __be32 *
nlm4_encode_testres(u32 *p, struct nlm_res *resp) nlm4_encode_testres(__be32 *p, struct nlm_res *resp)
{ {
s64 start, len; s64 start, len;
...@@ -227,7 +227,7 @@ nlm4_encode_testres(u32 *p, struct nlm_res *resp) ...@@ -227,7 +227,7 @@ nlm4_encode_testres(u32 *p, struct nlm_res *resp)
* First, the server side XDR functions * First, the server side XDR functions
*/ */
int int
nlm4svc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlm4svc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
u32 exclusive; u32 exclusive;
...@@ -244,7 +244,7 @@ nlm4svc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -244,7 +244,7 @@ nlm4svc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlm4svc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm4_encode_testres(p, resp))) if (!(p = nlm4_encode_testres(p, resp)))
return 0; return 0;
...@@ -252,7 +252,7 @@ nlm4svc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) ...@@ -252,7 +252,7 @@ nlm4svc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp)
} }
int int
nlm4svc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlm4svc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
u32 exclusive; u32 exclusive;
...@@ -272,7 +272,7 @@ nlm4svc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -272,7 +272,7 @@ nlm4svc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlm4svc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlm4svc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
u32 exclusive; u32 exclusive;
...@@ -288,7 +288,7 @@ nlm4svc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -288,7 +288,7 @@ nlm4svc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
if (!(p = nlm4_decode_cookie(p, &argp->cookie)) if (!(p = nlm4_decode_cookie(p, &argp->cookie))
|| !(p = nlm4_decode_lock(p, &argp->lock))) || !(p = nlm4_decode_lock(p, &argp->lock)))
...@@ -298,7 +298,7 @@ nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -298,7 +298,7 @@ nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlm4svc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) nlm4svc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -319,7 +319,7 @@ nlm4svc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) ...@@ -319,7 +319,7 @@ nlm4svc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp)
} }
int int
nlm4svc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm4_encode_cookie(p, &resp->cookie))) if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
return 0; return 0;
...@@ -329,7 +329,7 @@ nlm4svc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) ...@@ -329,7 +329,7 @@ nlm4svc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp)
} }
int int
nlm4svc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm4_encode_cookie(p, &resp->cookie))) if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
return 0; return 0;
...@@ -338,7 +338,7 @@ nlm4svc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) ...@@ -338,7 +338,7 @@ nlm4svc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp)
} }
int int
nlm4svc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp) nlm4svc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -350,7 +350,7 @@ nlm4svc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp) ...@@ -350,7 +350,7 @@ nlm4svc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp)
} }
int int
nlm4svc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp) nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp)
{ {
if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN)))
return 0; return 0;
...@@ -363,7 +363,7 @@ nlm4svc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp) ...@@ -363,7 +363,7 @@ nlm4svc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp)
} }
int int
nlm4svc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) nlm4svc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm4_decode_cookie(p, &resp->cookie))) if (!(p = nlm4_decode_cookie(p, &resp->cookie)))
return 0; return 0;
...@@ -372,13 +372,13 @@ nlm4svc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) ...@@ -372,13 +372,13 @@ nlm4svc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp)
} }
int int
nlm4svc_decode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) nlm4svc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
{ {
return xdr_argsize_check(rqstp, p); return xdr_argsize_check(rqstp, p);
} }
int int
nlm4svc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) nlm4svc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
{ {
return xdr_ressize_check(rqstp, p); return xdr_ressize_check(rqstp, p);
} }
...@@ -388,14 +388,14 @@ nlm4svc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) ...@@ -388,14 +388,14 @@ nlm4svc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy)
*/ */
#ifdef NLMCLNT_SUPPORT_SHARES #ifdef NLMCLNT_SUPPORT_SHARES
static int static int
nlm4clt_decode_void(struct rpc_rqst *req, u32 *p, void *ptr) nlm4clt_decode_void(struct rpc_rqst *req, __be32 *p, void *ptr)
{ {
return 0; return 0;
} }
#endif #endif
static int static int
nlm4clt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) nlm4clt_encode_testargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -409,7 +409,7 @@ nlm4clt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) ...@@ -409,7 +409,7 @@ nlm4clt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp)
} }
static int static int
nlm4clt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) nlm4clt_decode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm4_decode_cookie(p, &resp->cookie))) if (!(p = nlm4_decode_cookie(p, &resp->cookie)))
return -EIO; return -EIO;
...@@ -444,7 +444,7 @@ nlm4clt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) ...@@ -444,7 +444,7 @@ nlm4clt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp)
static int static int
nlm4clt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) nlm4clt_encode_lockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -461,7 +461,7 @@ nlm4clt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) ...@@ -461,7 +461,7 @@ nlm4clt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp)
} }
static int static int
nlm4clt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) nlm4clt_encode_cancargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -476,7 +476,7 @@ nlm4clt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) ...@@ -476,7 +476,7 @@ nlm4clt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp)
} }
static int static int
nlm4clt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) nlm4clt_encode_unlockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp)
{ {
struct nlm_lock *lock = &argp->lock; struct nlm_lock *lock = &argp->lock;
...@@ -489,7 +489,7 @@ nlm4clt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) ...@@ -489,7 +489,7 @@ nlm4clt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp)
} }
static int static int
nlm4clt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) nlm4clt_encode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm4_encode_cookie(p, &resp->cookie))) if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
return -EIO; return -EIO;
...@@ -499,7 +499,7 @@ nlm4clt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) ...@@ -499,7 +499,7 @@ nlm4clt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp)
} }
static int static int
nlm4clt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) nlm4clt_encode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm4_encode_testres(p, resp))) if (!(p = nlm4_encode_testres(p, resp)))
return -EIO; return -EIO;
...@@ -508,7 +508,7 @@ nlm4clt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) ...@@ -508,7 +508,7 @@ nlm4clt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp)
} }
static int static int
nlm4clt_decode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) nlm4clt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
{ {
if (!(p = nlm4_decode_cookie(p, &resp->cookie))) if (!(p = nlm4_decode_cookie(p, &resp->cookie)))
return -EIO; return -EIO;
......
...@@ -154,7 +154,7 @@ int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *); ...@@ -154,7 +154,7 @@ int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *);
struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
void nlmclnt_finish_block(struct nlm_wait *block); void nlmclnt_finish_block(struct nlm_wait *block);
int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout);
u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *); __be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *);
void nlmclnt_recovery(struct nlm_host *); void nlmclnt_recovery(struct nlm_host *);
int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); int nlmclnt_reclaim(struct nlm_host *, struct file_lock *);
void nlmclnt_next_cookie(struct nlm_cookie *); void nlmclnt_next_cookie(struct nlm_cookie *);
...@@ -184,12 +184,12 @@ typedef int (*nlm_host_match_fn_t)(struct nlm_host *cur, struct nlm_host *ref) ...@@ -184,12 +184,12 @@ typedef int (*nlm_host_match_fn_t)(struct nlm_host *cur, struct nlm_host *ref)
/* /*
* Server-side lock handling * Server-side lock handling
*/ */
u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *,
struct nlm_lock *, int, struct nlm_cookie *); struct nlm_lock *, int, struct nlm_cookie *);
u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); __be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *);
u32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *, __be32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *,
struct nlm_lock *); struct nlm_lock *);
u32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); __be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *);
unsigned long nlmsvc_retry_blocked(void); unsigned long nlmsvc_retry_blocked(void);
void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
nlm_host_match_fn_t match); nlm_host_match_fn_t match);
...@@ -198,7 +198,7 @@ void nlmsvc_grant_reply(struct nlm_cookie *, u32); ...@@ -198,7 +198,7 @@ void nlmsvc_grant_reply(struct nlm_cookie *, u32);
/* /*
* File handling for the server personality * File handling for the server personality
*/ */
u32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **,
struct nfs_fh *); struct nfs_fh *);
void nlm_release_file(struct nlm_file *); void nlm_release_file(struct nlm_file *);
void nlmsvc_mark_resources(void); void nlmsvc_mark_resources(void);
......
...@@ -21,9 +21,9 @@ struct nlm_share { ...@@ -21,9 +21,9 @@ struct nlm_share {
u32 s_mode; /* deny mode */ u32 s_mode; /* deny mode */
}; };
u32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *, __be32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *,
struct nlm_args *); struct nlm_args *);
u32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *, __be32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *,
struct nlm_args *); struct nlm_args *);
void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *,
nlm_host_match_fn_t); nlm_host_match_fn_t);
......
...@@ -90,19 +90,19 @@ struct nlm_reboot { ...@@ -90,19 +90,19 @@ struct nlm_reboot {
*/ */
#define NLMSVC_XDRSIZE sizeof(struct nlm_args) #define NLMSVC_XDRSIZE sizeof(struct nlm_args)
int nlmsvc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlmsvc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlmsvc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *); int nlmsvc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *);
int nlmsvc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlmsvc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlmsvc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlmsvc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlmsvc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlmsvc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlmsvc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *); int nlmsvc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
int nlmsvc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *); int nlmsvc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
int nlmsvc_encode_void(struct svc_rqst *, u32 *, void *); int nlmsvc_encode_void(struct svc_rqst *, __be32 *, void *);
int nlmsvc_decode_void(struct svc_rqst *, u32 *, void *); int nlmsvc_decode_void(struct svc_rqst *, __be32 *, void *);
int nlmsvc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlmsvc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlmsvc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *); int nlmsvc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *);
int nlmsvc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *); int nlmsvc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlmsvc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *); int nlmsvc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *);
/* /*
int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
......
...@@ -23,19 +23,19 @@ ...@@ -23,19 +23,19 @@
int nlm4svc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlm4svc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlm4svc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *); int nlm4svc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *);
int nlm4svc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlm4svc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlm4svc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlm4svc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlm4svc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlm4svc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlm4svc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *); int nlm4svc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
int nlm4svc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *); int nlm4svc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
int nlm4svc_encode_void(struct svc_rqst *, u32 *, void *); int nlm4svc_encode_void(struct svc_rqst *, __be32 *, void *);
int nlm4svc_decode_void(struct svc_rqst *, u32 *, void *); int nlm4svc_decode_void(struct svc_rqst *, __be32 *, void *);
int nlm4svc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *); int nlm4svc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlm4svc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *); int nlm4svc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *);
int nlm4svc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *); int nlm4svc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *);
int nlm4svc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *); int nlm4svc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *);
/* /*
int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment