nfsd: misc endianness annotations
PATCH 24/25 nfsd: misc endianness annotations
Signed-off-by Al Viro <[email protected]>
--- fs/nfsd/export.c | 4 ++-- fs/nfsd/lockd.c | 2 +- fs/nfsd/nfs4callback.c | 2 +- fs/nfsd/nfs4state.c | 4 ++-- fs/nfsd/nfscache.c | 8 ++++---- fs/nfsd/nfssvc.c | 2 +- include/linux/nfsd/cache.h | 6 +++--- include/linux/nfsd/export.h | 2 +- include/linux/nfsd/nfsd.h | 2 +- include/linux/nfsd/nfsfh.h | 2 +- include/linux/nfsd/state.h | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-)
fs/nfsd/export.c +2 -2
@@ -1148,12 +1148,12 @@ exp_find(struct auth_domain *clp, int fs* for a given NFSv4 client. The root is defined to be the * export point with fsid==0 */ -int +__be32 exp_pseudoroot (struct auth_domain *clp,struct svc_fh *fhp,struct cache_req *creq) {struct svc_export *exp; -int rv; +__be32 rv;u32 fsidv[2 ];mk_fsid_v1 (fsidv,0 );
fs/nfsd/lockd.c +1 -1
@@ -25,7 +25,7 @@ #define NFSDDBG_FACILITY NFSDDBG_LOCKDstatic u32 nlm_fopen (struct svc_rqst *rqstp,struct nfs_fh *f,struct file **filp) { -u32 nfserr; +__be32 nfserr;struct svc_fh fh;/* must initialize before using! but maxsize doesn't matter */
fs/nfsd/nfs4callback.c +1 -1
@@ -461,7 +461,7 @@ nfs4_cb_null(struct rpc_task *task, void {struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp;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);
fs/nfsd/nfs4state.c +2 -2
@@ -713,7 +713,7 @@ out_err:__be32 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 = { .len = setclid->se_namelen, .data = setclid->se_name,
@@ -878,7 +878,7 @@ out:__be32 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;nfs4_verifier confirm = setclientid_confirm->sc_confirm;clientid_t * clid = &setclientid_confirm->sc_clientid;
fs/nfsd/nfscache.c +4 -4
@@ -29,7 +29,7 @@ #include <linux/nfsd/cache.h>*/ #define CACHESIZE 1024#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 list_head lru_head;
@@ -127,8 +127,8 @@ nfsd_cache_lookup(struct svc_rqst *rqstpstruct hlist_node *hn;struct hlist_head *rh;struct svc_cacherep *rp; -u32 xid = rqstp->rq_xid, - proto = rqstp->rq_prot, +__be32 xid = rqstp->rq_xid; +u32 proto = rqstp->rq_prot, vers = rqstp->rq_vers, proc = rqstp->rq_proc;unsigned long age;
@@ -258,7 +258,7 @@ found_entry:* In this case, nfsd_cache_update is called with statp == NULL. */ 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 kvec *resv = &rqstp->rq_res.head[0 ], *cachv;
fs/nfsd/nfssvc.c +1 -1
@@ -491,7 +491,7 @@ out: }int -nfsd_dispatch (struct svc_rqst *rqstp,u32 *statp) +nfsd_dispatch (struct svc_rqst *rqstp,__be32 *statp) {struct svc_procedure *proc;kxdrproc_t xdr;
include/linux/nfsd/cache.h +3 -3
@@ -26,14 +26,14 @@ struct svc_cacherep { c_type,/* status, buffer */ c_secure : 1; /* req came from port < 1024 */struct sockaddr_in c_addr; -u32 c_xid; +__be32 c_xid;u32 c_prot;u32 c_proc;u32 c_vers;unsigned long c_timestamp;union {struct kvec u_vec; -u32 u_status; +__be32 u_status; } c_u; };
@@ -75,7 +75,7 @@ #define RC_DELAY (HZ/5)void nfsd_cache_init (void );void nfsd_cache_shutdown (void );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 /* NFSCACHE_H */
include/linux/nfsd/export.h +1 -1
@@ -117,7 +117,7 @@ struct svc_export * exp_parent(struct au struct cache_req *reqp);int exp_rootfh (struct auth_domain *,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);extern struct cache_detail svc_export_cache;
include/linux/nfsd/nfsd.h +1 -1
@@ -64,7 +64,7 @@ extern struct svc_serv *nfsd_serv;* Function prototypes. */ 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 */ int fh_lock_parent (struct svc_fh *,struct dentry *);
include/linux/nfsd/nfsfh.h +1 -1
@@ -157,7 +157,7 @@ #ifdef CONFIG_NFSD_V3__u64 fh_post_size;/* i_size */ unsigned long fh_post_blocks;/* i_blocks */ 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_mtime;/* i_mtime */ struct timespec fh_post_ctime;/* i_ctime */
include/linux/nfsd/state.h +1 -1
@@ -125,7 +125,7 @@ struct nfs4_client {char cl_recdir[HEXDIR_LEN ];/* recovery dir */ nfs4_verifier cl_verifier;/* generated by client */ 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 */ clientid_t cl_clientid;/* generated by server */ nfs4_verifier cl_confirm;/* generated by server */
Signature · 1 line
1.4.2.GIT