Commit c7afef1f authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] nfsd: misc endianness annotations

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 f00f328f
...@@ -1148,12 +1148,12 @@ exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, ...@@ -1148,12 +1148,12 @@ exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv,
* for a given NFSv4 client. The root is defined to be the * for a given NFSv4 client. The root is defined to be the
* export point with fsid==0 * export point with fsid==0
*/ */
int __be32
exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp, exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp,
struct cache_req *creq) struct cache_req *creq)
{ {
struct svc_export *exp; struct svc_export *exp;
int rv; __be32 rv;
u32 fsidv[2]; u32 fsidv[2];
mk_fsid_v1(fsidv, 0); mk_fsid_v1(fsidv, 0);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
static u32 static u32
nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp) nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp)
{ {
u32 nfserr; __be32 nfserr;
struct svc_fh fh; struct svc_fh fh;
/* must initialize before using! but maxsize doesn't matter */ /* must initialize before using! but maxsize doesn't matter */
......
...@@ -461,7 +461,7 @@ nfs4_cb_null(struct rpc_task *task, void *dummy) ...@@ -461,7 +461,7 @@ nfs4_cb_null(struct rpc_task *task, void *dummy)
{ {
struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp; struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp;
struct nfs4_callback *cb = &clp->cl_callback; struct nfs4_callback *cb = &clp->cl_callback;
u32 addr = htonl(cb->cb_addr); __be32 addr = htonl(cb->cb_addr);
dprintk("NFSD: nfs4_cb_null task->tk_status %d\n", task->tk_status); dprintk("NFSD: nfs4_cb_null task->tk_status %d\n", task->tk_status);
......
...@@ -713,7 +713,7 @@ gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se) ...@@ -713,7 +713,7 @@ gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se)
__be32 __be32
nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid) nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid)
{ {
u32 ip_addr = rqstp->rq_addr.sin_addr.s_addr; __be32 ip_addr = rqstp->rq_addr.sin_addr.s_addr;
struct xdr_netobj clname = { struct xdr_netobj clname = {
.len = setclid->se_namelen, .len = setclid->se_namelen,
.data = setclid->se_name, .data = setclid->se_name,
...@@ -878,7 +878,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid) ...@@ -878,7 +878,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid)
__be32 __be32
nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confirm *setclientid_confirm) nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confirm *setclientid_confirm)
{ {
u32 ip_addr = rqstp->rq_addr.sin_addr.s_addr; __be32 ip_addr = rqstp->rq_addr.sin_addr.s_addr;
struct nfs4_client *conf, *unconf; struct nfs4_client *conf, *unconf;
nfs4_verifier confirm = setclientid_confirm->sc_confirm; nfs4_verifier confirm = setclientid_confirm->sc_confirm;
clientid_t * clid = &setclientid_confirm->sc_clientid; clientid_t * clid = &setclientid_confirm->sc_clientid;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*/ */
#define CACHESIZE 1024 #define CACHESIZE 1024
#define HASHSIZE 64 #define HASHSIZE 64
#define REQHASH(xid) ((((xid) >> 24) ^ (xid)) & (HASHSIZE-1)) #define REQHASH(xid) (((((__force __u32)xid) >> 24) ^ ((__force __u32)xid)) & (HASHSIZE-1))
static struct hlist_head * hash_list; static struct hlist_head * hash_list;
static struct list_head lru_head; static struct list_head lru_head;
...@@ -127,8 +127,8 @@ nfsd_cache_lookup(struct svc_rqst *rqstp, int type) ...@@ -127,8 +127,8 @@ nfsd_cache_lookup(struct svc_rqst *rqstp, int type)
struct hlist_node *hn; struct hlist_node *hn;
struct hlist_head *rh; struct hlist_head *rh;
struct svc_cacherep *rp; struct svc_cacherep *rp;
u32 xid = rqstp->rq_xid, __be32 xid = rqstp->rq_xid;
proto = rqstp->rq_prot, u32 proto = rqstp->rq_prot,
vers = rqstp->rq_vers, vers = rqstp->rq_vers,
proc = rqstp->rq_proc; proc = rqstp->rq_proc;
unsigned long age; unsigned long age;
...@@ -258,7 +258,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp, int type) ...@@ -258,7 +258,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp, int type)
* In this case, nfsd_cache_update is called with statp == NULL. * In this case, nfsd_cache_update is called with statp == NULL.
*/ */
void void
nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, u32 *statp) nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
{ {
struct svc_cacherep *rp; struct svc_cacherep *rp;
struct kvec *resv = &rqstp->rq_res.head[0], *cachv; struct kvec *resv = &rqstp->rq_res.head[0], *cachv;
......
...@@ -491,7 +491,7 @@ nfsd(struct svc_rqst *rqstp) ...@@ -491,7 +491,7 @@ nfsd(struct svc_rqst *rqstp)
} }
int int
nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
{ {
struct svc_procedure *proc; struct svc_procedure *proc;
kxdrproc_t xdr; kxdrproc_t xdr;
......
...@@ -26,14 +26,14 @@ struct svc_cacherep { ...@@ -26,14 +26,14 @@ struct svc_cacherep {
c_type, /* status, buffer */ c_type, /* status, buffer */
c_secure : 1; /* req came from port < 1024 */ c_secure : 1; /* req came from port < 1024 */
struct sockaddr_in c_addr; struct sockaddr_in c_addr;
u32 c_xid; __be32 c_xid;
u32 c_prot; u32 c_prot;
u32 c_proc; u32 c_proc;
u32 c_vers; u32 c_vers;
unsigned long c_timestamp; unsigned long c_timestamp;
union { union {
struct kvec u_vec; struct kvec u_vec;
u32 u_status; __be32 u_status;
} c_u; } c_u;
}; };
...@@ -75,7 +75,7 @@ enum { ...@@ -75,7 +75,7 @@ enum {
void nfsd_cache_init(void); void nfsd_cache_init(void);
void nfsd_cache_shutdown(void); void nfsd_cache_shutdown(void);
int nfsd_cache_lookup(struct svc_rqst *, int); int nfsd_cache_lookup(struct svc_rqst *, int);
void nfsd_cache_update(struct svc_rqst *, int, u32 *); void nfsd_cache_update(struct svc_rqst *, int, __be32 *);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* NFSCACHE_H */ #endif /* NFSCACHE_H */
...@@ -117,7 +117,7 @@ struct svc_export * exp_parent(struct auth_domain *clp, ...@@ -117,7 +117,7 @@ struct svc_export * exp_parent(struct auth_domain *clp,
struct cache_req *reqp); struct cache_req *reqp);
int exp_rootfh(struct auth_domain *, int exp_rootfh(struct auth_domain *,
char *path, struct knfsd_fh *, int maxsize); char *path, struct knfsd_fh *, int maxsize);
int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); __be32 exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
__be32 nfserrno(int errno); __be32 nfserrno(int errno);
extern struct cache_detail svc_export_cache; extern struct cache_detail svc_export_cache;
......
...@@ -64,7 +64,7 @@ extern struct svc_serv *nfsd_serv; ...@@ -64,7 +64,7 @@ extern struct svc_serv *nfsd_serv;
* Function prototypes. * Function prototypes.
*/ */
int nfsd_svc(unsigned short port, int nrservs); int nfsd_svc(unsigned short port, int nrservs);
int nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp); int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp);
/* nfsd/vfs.c */ /* nfsd/vfs.c */
int fh_lock_parent(struct svc_fh *, struct dentry *); int fh_lock_parent(struct svc_fh *, struct dentry *);
......
...@@ -157,7 +157,7 @@ typedef struct svc_fh { ...@@ -157,7 +157,7 @@ typedef struct svc_fh {
__u64 fh_post_size; /* i_size */ __u64 fh_post_size; /* i_size */
unsigned long fh_post_blocks; /* i_blocks */ unsigned long fh_post_blocks; /* i_blocks */
unsigned long fh_post_blksize;/* i_blksize */ unsigned long fh_post_blksize;/* i_blksize */
__u32 fh_post_rdev[2];/* i_rdev */ __be32 fh_post_rdev[2];/* i_rdev */
struct timespec fh_post_atime; /* i_atime */ struct timespec fh_post_atime; /* i_atime */
struct timespec fh_post_mtime; /* i_mtime */ struct timespec fh_post_mtime; /* i_mtime */
struct timespec fh_post_ctime; /* i_ctime */ struct timespec fh_post_ctime; /* i_ctime */
......
...@@ -125,7 +125,7 @@ struct nfs4_client { ...@@ -125,7 +125,7 @@ struct nfs4_client {
char cl_recdir[HEXDIR_LEN]; /* recovery dir */ char cl_recdir[HEXDIR_LEN]; /* recovery dir */
nfs4_verifier cl_verifier; /* generated by client */ nfs4_verifier cl_verifier; /* generated by client */
time_t cl_time; /* time of last lease renewal */ time_t cl_time; /* time of last lease renewal */
u32 cl_addr; /* client ipaddress */ __be32 cl_addr; /* client ipaddress */
struct svc_cred cl_cred; /* setclientid principal */ struct svc_cred cl_cred; /* setclientid principal */
clientid_t cl_clientid; /* generated by server */ clientid_t cl_clientid; /* generated by server */
nfs4_verifier cl_confirm; /* generated by server */ nfs4_verifier cl_confirm; /* generated by server */
......
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