2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-18 23:54:26 +08:00

[PATCH] nfsd: misc endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Al Viro 2006-10-19 23:29:02 -07:00 committed by Linus Torvalds
parent f00f328fda
commit c7afef1f96
11 changed files with 18 additions and 18 deletions

View File

@ -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
* 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);

View File

@ -25,7 +25,7 @@
static 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 */

View File

@ -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_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);

View File

@ -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;

View File

@ -29,7 +29,7 @@
*/
#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 *rqstp, int type)
struct 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;

View File

@ -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;

View File

@ -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 @@ enum {
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 */

View File

@ -117,7 +117,7 @@ struct svc_export * exp_parent(struct auth_domain *clp,
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;

View File

@ -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 *);

View File

@ -157,7 +157,7 @@ typedef struct svc_fh {
__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 */

View File

@ -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 */