diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-20 02:28:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:40 -0400 |
commit | 52921e02a4f4163a7b1f4b5dde71e1debc71de4a (patch) | |
tree | 0202a8a4c8c78aed1826540fb33faf64a88837ce | |
parent | 7111c66e4e70588c9602035a4996c9cdc2087d2d (diff) |
[PATCH] lockd endianness annotations
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
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>
-rw-r--r-- | fs/lockd/clntlock.c | 4 | ||||
-rw-r--r-- | fs/lockd/mon.c | 12 | ||||
-rw-r--r-- | fs/lockd/svc4proc.c | 4 | ||||
-rw-r--r-- | fs/lockd/svclock.c | 10 | ||||
-rw-r--r-- | fs/lockd/svcproc.c | 8 | ||||
-rw-r--r-- | fs/lockd/svcshare.c | 4 | ||||
-rw-r--r-- | fs/lockd/svcsubs.c | 4 | ||||
-rw-r--r-- | fs/lockd/xdr.c | 76 | ||||
-rw-r--r-- | fs/lockd/xdr4.c | 80 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 12 | ||||
-rw-r--r-- | include/linux/lockd/share.h | 4 | ||||
-rw-r--r-- | include/linux/lockd/xdr.h | 26 | ||||
-rw-r--r-- | include/linux/lockd/xdr4.h | 26 |
13 files changed, 135 insertions, 135 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index e8c7765419e8..b85a0ad2cfb6 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c | |||
@@ -100,12 +100,12 @@ int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout) | |||
100 | /* | 100 | /* |
101 | * The server lockd has called us back to tell us the lock was granted | 101 | * The server lockd has called us back to tell us the lock was granted |
102 | */ | 102 | */ |
103 | u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock) | 103 | __be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock) |
104 | { | 104 | { |
105 | const struct file_lock *fl = &lock->fl; | 105 | const struct file_lock *fl = &lock->fl; |
106 | const struct nfs_fh *fh = &lock->fh; | 106 | const struct nfs_fh *fh = &lock->fh; |
107 | struct nlm_wait *block; | 107 | struct nlm_wait *block; |
108 | u32 res = nlm_lck_denied; | 108 | __be32 res = nlm_lck_denied; |
109 | 109 | ||
110 | /* | 110 | /* |
111 | * Look up blocked request based on arguments. | 111 | * Look up blocked request based on arguments. |
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index e0179f8c327f..eb243edf8932 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c | |||
@@ -148,8 +148,8 @@ nsm_create(void) | |||
148 | * XDR functions for NSM. | 148 | * XDR functions for NSM. |
149 | */ | 149 | */ |
150 | 150 | ||
151 | static u32 * | 151 | static __be32 * |
152 | xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) | 152 | xdr_encode_common(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp) |
153 | { | 153 | { |
154 | char buffer[20], *name; | 154 | char buffer[20], *name; |
155 | 155 | ||
@@ -176,7 +176,7 @@ xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) | |||
176 | } | 176 | } |
177 | 177 | ||
178 | static int | 178 | static int |
179 | xdr_encode_mon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) | 179 | xdr_encode_mon(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp) |
180 | { | 180 | { |
181 | p = xdr_encode_common(rqstp, p, argp); | 181 | p = xdr_encode_common(rqstp, p, argp); |
182 | if (IS_ERR(p)) | 182 | if (IS_ERR(p)) |
@@ -192,7 +192,7 @@ xdr_encode_mon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) | |||
192 | } | 192 | } |
193 | 193 | ||
194 | static int | 194 | static int |
195 | xdr_encode_unmon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) | 195 | xdr_encode_unmon(struct rpc_rqst *rqstp, __be32 *p, struct nsm_args *argp) |
196 | { | 196 | { |
197 | p = xdr_encode_common(rqstp, p, argp); | 197 | p = xdr_encode_common(rqstp, p, argp); |
198 | if (IS_ERR(p)) | 198 | if (IS_ERR(p)) |
@@ -202,7 +202,7 @@ xdr_encode_unmon(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) | |||
202 | } | 202 | } |
203 | 203 | ||
204 | static int | 204 | static int |
205 | xdr_decode_stat_res(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp) | 205 | xdr_decode_stat_res(struct rpc_rqst *rqstp, __be32 *p, struct nsm_res *resp) |
206 | { | 206 | { |
207 | resp->status = ntohl(*p++); | 207 | resp->status = ntohl(*p++); |
208 | resp->state = ntohl(*p++); | 208 | resp->state = ntohl(*p++); |
@@ -212,7 +212,7 @@ xdr_decode_stat_res(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp) | |||
212 | } | 212 | } |
213 | 213 | ||
214 | static int | 214 | static int |
215 | xdr_decode_stat(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp) | 215 | xdr_decode_stat(struct rpc_rqst *rqstp, __be32 *p, struct nsm_res *resp) |
216 | { | 216 | { |
217 | resp->state = ntohl(*p++); | 217 | resp->state = ntohl(*p++); |
218 | return 0; | 218 | return 0; |
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index 4e719860b4bf..0ce5c81ff507 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c | |||
@@ -24,14 +24,14 @@ | |||
24 | /* | 24 | /* |
25 | * Obtain client and file from arguments | 25 | * Obtain client and file from arguments |
26 | */ | 26 | */ |
27 | static u32 | 27 | static __be32 |
28 | nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, | 28 | nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, |
29 | struct nlm_host **hostp, struct nlm_file **filp) | 29 | struct nlm_host **hostp, struct nlm_file **filp) |
30 | { | 30 | { |
31 | struct nlm_host *host = NULL; | 31 | struct nlm_host *host = NULL; |
32 | struct nlm_file *file = NULL; | 32 | struct nlm_file *file = NULL; |
33 | struct nlm_lock *lock = &argp->lock; | 33 | struct nlm_lock *lock = &argp->lock; |
34 | u32 error = 0; | 34 | __be32 error = 0; |
35 | 35 | ||
36 | /* nfsd callbacks must have been installed for this procedure */ | 36 | /* nfsd callbacks must have been installed for this procedure */ |
37 | if (!nlmsvc_ops) | 37 | if (!nlmsvc_ops) |
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 814c6064c9e0..7e219b938552 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -334,13 +334,13 @@ static void nlmsvc_freegrantargs(struct nlm_rqst *call) | |||
334 | * Attempt to establish a lock, and if it can't be granted, block it | 334 | * Attempt to establish a lock, and if it can't be granted, block it |
335 | * if required. | 335 | * if required. |
336 | */ | 336 | */ |
337 | u32 | 337 | __be32 |
338 | nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file, | 338 | nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file, |
339 | struct nlm_lock *lock, int wait, struct nlm_cookie *cookie) | 339 | struct nlm_lock *lock, int wait, struct nlm_cookie *cookie) |
340 | { | 340 | { |
341 | struct nlm_block *block, *newblock = NULL; | 341 | struct nlm_block *block, *newblock = NULL; |
342 | int error; | 342 | int error; |
343 | u32 ret; | 343 | __be32 ret; |
344 | 344 | ||
345 | dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n", | 345 | dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n", |
346 | file->f_file->f_dentry->d_inode->i_sb->s_id, | 346 | file->f_file->f_dentry->d_inode->i_sb->s_id, |
@@ -415,7 +415,7 @@ out: | |||
415 | /* | 415 | /* |
416 | * Test for presence of a conflicting lock. | 416 | * Test for presence of a conflicting lock. |
417 | */ | 417 | */ |
418 | u32 | 418 | __be32 |
419 | nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock, | 419 | nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock, |
420 | struct nlm_lock *conflock) | 420 | struct nlm_lock *conflock) |
421 | { | 421 | { |
@@ -448,7 +448,7 @@ nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock, | |||
448 | * afterwards. In this case the block will still be there, and hence | 448 | * afterwards. In this case the block will still be there, and hence |
449 | * must be removed. | 449 | * must be removed. |
450 | */ | 450 | */ |
451 | u32 | 451 | __be32 |
452 | nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock) | 452 | nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock) |
453 | { | 453 | { |
454 | int error; | 454 | int error; |
@@ -476,7 +476,7 @@ nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock) | |||
476 | * be in progress. | 476 | * be in progress. |
477 | * The calling procedure must check whether the file can be closed. | 477 | * The calling procedure must check whether the file can be closed. |
478 | */ | 478 | */ |
479 | u32 | 479 | __be32 |
480 | nlmsvc_cancel_blocked(struct nlm_file *file, struct nlm_lock *lock) | 480 | nlmsvc_cancel_blocked(struct nlm_file *file, struct nlm_lock *lock) |
481 | { | 481 | { |
482 | struct nlm_block *block; | 482 | struct nlm_block *block; |
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c index db8d85c32d29..32e99a6e8dca 100644 --- a/fs/lockd/svcproc.c +++ b/fs/lockd/svcproc.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #define NLMDBG_FACILITY NLMDBG_CLIENT | 22 | #define NLMDBG_FACILITY NLMDBG_CLIENT |
23 | 23 | ||
24 | #ifdef CONFIG_LOCKD_V4 | 24 | #ifdef CONFIG_LOCKD_V4 |
25 | static u32 | 25 | static __be32 |
26 | cast_to_nlm(u32 status, u32 vers) | 26 | cast_to_nlm(__be32 status, u32 vers) |
27 | { | 27 | { |
28 | /* Note: status is assumed to be in network byte order !!! */ | 28 | /* Note: status is assumed to be in network byte order !!! */ |
29 | if (vers != 4){ | 29 | if (vers != 4){ |
@@ -52,14 +52,14 @@ cast_to_nlm(u32 status, u32 vers) | |||
52 | /* | 52 | /* |
53 | * Obtain client and file from arguments | 53 | * Obtain client and file from arguments |
54 | */ | 54 | */ |
55 | static u32 | 55 | static __be32 |
56 | nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, | 56 | nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, |
57 | struct nlm_host **hostp, struct nlm_file **filp) | 57 | struct nlm_host **hostp, struct nlm_file **filp) |
58 | { | 58 | { |
59 | struct nlm_host *host = NULL; | 59 | struct nlm_host *host = NULL; |
60 | struct nlm_file *file = NULL; | 60 | struct nlm_file *file = NULL; |
61 | struct nlm_lock *lock = &argp->lock; | 61 | struct nlm_lock *lock = &argp->lock; |
62 | u32 error = 0; | 62 | __be32 error = 0; |
63 | 63 | ||
64 | /* nfsd callbacks must have been installed for this procedure */ | 64 | /* nfsd callbacks must have been installed for this procedure */ |
65 | if (!nlmsvc_ops) | 65 | if (!nlmsvc_ops) |
diff --git a/fs/lockd/svcshare.c b/fs/lockd/svcshare.c index b9926ce8782e..6220dc2a3f2c 100644 --- a/fs/lockd/svcshare.c +++ b/fs/lockd/svcshare.c | |||
@@ -23,7 +23,7 @@ nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh) | |||
23 | && !memcmp(share->s_owner.data, oh->data, oh->len); | 23 | && !memcmp(share->s_owner.data, oh->data, oh->len); |
24 | } | 24 | } |
25 | 25 | ||
26 | u32 | 26 | __be32 |
27 | nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file, | 27 | nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file, |
28 | struct nlm_args *argp) | 28 | struct nlm_args *argp) |
29 | { | 29 | { |
@@ -64,7 +64,7 @@ update: | |||
64 | /* | 64 | /* |
65 | * Delete a share. | 65 | * Delete a share. |
66 | */ | 66 | */ |
67 | u32 | 67 | __be32 |
68 | nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file, | 68 | nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file, |
69 | struct nlm_args *argp) | 69 | struct nlm_args *argp) |
70 | { | 70 | { |
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index 7dac96e6c82c..e83024e16042 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c | |||
@@ -78,14 +78,14 @@ static inline unsigned int file_hash(struct nfs_fh *f) | |||
78 | * This is not quite right, but for now, we assume the client performs | 78 | * This is not quite right, but for now, we assume the client performs |
79 | * the proper R/W checking. | 79 | * the proper R/W checking. |
80 | */ | 80 | */ |
81 | u32 | 81 | __be32 |
82 | nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, | 82 | nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, |
83 | struct nfs_fh *f) | 83 | struct nfs_fh *f) |
84 | { | 84 | { |
85 | struct hlist_node *pos; | 85 | struct hlist_node *pos; |
86 | struct nlm_file *file; | 86 | struct nlm_file *file; |
87 | unsigned int hash; | 87 | unsigned int hash; |
88 | u32 nfserr; | 88 | __be32 nfserr; |
89 | 89 | ||
90 | nlm_debug_print_fh("nlm_file_lookup", f); | 90 | nlm_debug_print_fh("nlm_file_lookup", f); |
91 | 91 | ||
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 61c46facf257..b7c949256e5a 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c | |||
@@ -43,7 +43,7 @@ loff_t_to_s32(loff_t offset) | |||
43 | /* | 43 | /* |
44 | * XDR functions for basic NLM types | 44 | * XDR functions for basic NLM types |
45 | */ | 45 | */ |
46 | static u32 *nlm_decode_cookie(u32 *p, struct nlm_cookie *c) | 46 | static __be32 *nlm_decode_cookie(__be32 *p, struct nlm_cookie *c) |
47 | { | 47 | { |
48 | unsigned int len; | 48 | unsigned int len; |
49 | 49 | ||
@@ -69,8 +69,8 @@ static u32 *nlm_decode_cookie(u32 *p, struct nlm_cookie *c) | |||
69 | return p; | 69 | return p; |
70 | } | 70 | } |
71 | 71 | ||
72 | static inline u32 * | 72 | static inline __be32 * |
73 | nlm_encode_cookie(u32 *p, struct nlm_cookie *c) | 73 | nlm_encode_cookie(__be32 *p, struct nlm_cookie *c) |
74 | { | 74 | { |
75 | *p++ = htonl(c->len); | 75 | *p++ = htonl(c->len); |
76 | memcpy(p, c->data, c->len); | 76 | memcpy(p, c->data, c->len); |
@@ -78,8 +78,8 @@ nlm_encode_cookie(u32 *p, struct nlm_cookie *c) | |||
78 | return p; | 78 | return p; |
79 | } | 79 | } |
80 | 80 | ||
81 | static u32 * | 81 | static __be32 * |
82 | nlm_decode_fh(u32 *p, struct nfs_fh *f) | 82 | nlm_decode_fh(__be32 *p, struct nfs_fh *f) |
83 | { | 83 | { |
84 | unsigned int len; | 84 | unsigned int len; |
85 | 85 | ||
@@ -95,8 +95,8 @@ nlm_decode_fh(u32 *p, struct nfs_fh *f) | |||
95 | return p + XDR_QUADLEN(NFS2_FHSIZE); | 95 | return p + XDR_QUADLEN(NFS2_FHSIZE); |
96 | } | 96 | } |
97 | 97 | ||
98 | static inline u32 * | 98 | static inline __be32 * |
99 | nlm_encode_fh(u32 *p, struct nfs_fh *f) | 99 | nlm_encode_fh(__be32 *p, struct nfs_fh *f) |
100 | { | 100 | { |
101 | *p++ = htonl(NFS2_FHSIZE); | 101 | *p++ = htonl(NFS2_FHSIZE); |
102 | memcpy(p, f->data, NFS2_FHSIZE); | 102 | memcpy(p, f->data, NFS2_FHSIZE); |
@@ -106,20 +106,20 @@ nlm_encode_fh(u32 *p, struct nfs_fh *f) | |||
106 | /* | 106 | /* |
107 | * Encode and decode owner handle | 107 | * Encode and decode owner handle |
108 | */ | 108 | */ |
109 | static inline u32 * | 109 | static inline __be32 * |
110 | nlm_decode_oh(u32 *p, struct xdr_netobj *oh) | 110 | nlm_decode_oh(__be32 *p, struct xdr_netobj *oh) |
111 | { | 111 | { |
112 | return xdr_decode_netobj(p, oh); | 112 | return xdr_decode_netobj(p, oh); |
113 | } | 113 | } |
114 | 114 | ||
115 | static inline u32 * | 115 | static inline __be32 * |
116 | nlm_encode_oh(u32 *p, struct xdr_netobj *oh) | 116 | nlm_encode_oh(__be32 *p, struct xdr_netobj *oh) |
117 | { | 117 | { |
118 | return xdr_encode_netobj(p, oh); | 118 | return xdr_encode_netobj(p, oh); |
119 | } | 119 | } |
120 | 120 | ||
121 | static u32 * | 121 | static __be32 * |
122 | nlm_decode_lock(u32 *p, struct nlm_lock *lock) | 122 | nlm_decode_lock(__be32 *p, struct nlm_lock *lock) |
123 | { | 123 | { |
124 | struct file_lock *fl = &lock->fl; | 124 | struct file_lock *fl = &lock->fl; |
125 | s32 start, len, end; | 125 | s32 start, len, end; |
@@ -153,8 +153,8 @@ nlm_decode_lock(u32 *p, struct nlm_lock *lock) | |||
153 | /* | 153 | /* |
154 | * Encode a lock as part of an NLM call | 154 | * Encode a lock as part of an NLM call |
155 | */ | 155 | */ |
156 | static u32 * | 156 | static __be32 * |
157 | nlm_encode_lock(u32 *p, struct nlm_lock *lock) | 157 | nlm_encode_lock(__be32 *p, struct nlm_lock *lock) |
158 | { | 158 | { |
159 | struct file_lock *fl = &lock->fl; | 159 | struct file_lock *fl = &lock->fl; |
160 | __s32 start, len; | 160 | __s32 start, len; |
@@ -184,8 +184,8 @@ nlm_encode_lock(u32 *p, struct nlm_lock *lock) | |||
184 | /* | 184 | /* |
185 | * Encode result of a TEST/TEST_MSG call | 185 | * Encode result of a TEST/TEST_MSG call |
186 | */ | 186 | */ |
187 | static u32 * | 187 | static __be32 * |
188 | nlm_encode_testres(u32 *p, struct nlm_res *resp) | 188 | nlm_encode_testres(__be32 *p, struct nlm_res *resp) |
189 | { | 189 | { |
190 | s32 start, len; | 190 | s32 start, len; |
191 | 191 | ||
@@ -221,7 +221,7 @@ nlm_encode_testres(u32 *p, struct nlm_res *resp) | |||
221 | * First, the server side XDR functions | 221 | * First, the server side XDR functions |
222 | */ | 222 | */ |
223 | int | 223 | int |
224 | nlmsvc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 224 | nlmsvc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
225 | { | 225 | { |
226 | u32 exclusive; | 226 | u32 exclusive; |
227 | 227 | ||
@@ -238,7 +238,7 @@ nlmsvc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
238 | } | 238 | } |
239 | 239 | ||
240 | int | 240 | int |
241 | nlmsvc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | 241 | nlmsvc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) |
242 | { | 242 | { |
243 | if (!(p = nlm_encode_testres(p, resp))) | 243 | if (!(p = nlm_encode_testres(p, resp))) |
244 | return 0; | 244 | return 0; |
@@ -246,7 +246,7 @@ nlmsvc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | |||
246 | } | 246 | } |
247 | 247 | ||
248 | int | 248 | int |
249 | nlmsvc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 249 | nlmsvc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
250 | { | 250 | { |
251 | u32 exclusive; | 251 | u32 exclusive; |
252 | 252 | ||
@@ -266,7 +266,7 @@ nlmsvc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
266 | } | 266 | } |
267 | 267 | ||
268 | int | 268 | int |
269 | nlmsvc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 269 | nlmsvc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
270 | { | 270 | { |
271 | u32 exclusive; | 271 | u32 exclusive; |
272 | 272 | ||
@@ -282,7 +282,7 @@ nlmsvc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
282 | } | 282 | } |
283 | 283 | ||
284 | int | 284 | int |
285 | nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 285 | nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
286 | { | 286 | { |
287 | if (!(p = nlm_decode_cookie(p, &argp->cookie)) | 287 | if (!(p = nlm_decode_cookie(p, &argp->cookie)) |
288 | || !(p = nlm_decode_lock(p, &argp->lock))) | 288 | || !(p = nlm_decode_lock(p, &argp->lock))) |
@@ -292,7 +292,7 @@ nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
292 | } | 292 | } |
293 | 293 | ||
294 | int | 294 | int |
295 | nlmsvc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 295 | nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
296 | { | 296 | { |
297 | struct nlm_lock *lock = &argp->lock; | 297 | struct nlm_lock *lock = &argp->lock; |
298 | 298 | ||
@@ -313,7 +313,7 @@ nlmsvc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
313 | } | 313 | } |
314 | 314 | ||
315 | int | 315 | int |
316 | nlmsvc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | 316 | nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) |
317 | { | 317 | { |
318 | if (!(p = nlm_encode_cookie(p, &resp->cookie))) | 318 | if (!(p = nlm_encode_cookie(p, &resp->cookie))) |
319 | return 0; | 319 | return 0; |
@@ -323,7 +323,7 @@ nlmsvc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | |||
323 | } | 323 | } |
324 | 324 | ||
325 | int | 325 | int |
326 | nlmsvc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | 326 | nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) |
327 | { | 327 | { |
328 | if (!(p = nlm_encode_cookie(p, &resp->cookie))) | 328 | if (!(p = nlm_encode_cookie(p, &resp->cookie))) |
329 | return 0; | 329 | return 0; |
@@ -332,7 +332,7 @@ nlmsvc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | |||
332 | } | 332 | } |
333 | 333 | ||
334 | int | 334 | int |
335 | nlmsvc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp) | 335 | nlmsvc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp) |
336 | { | 336 | { |
337 | struct nlm_lock *lock = &argp->lock; | 337 | struct nlm_lock *lock = &argp->lock; |
338 | 338 | ||
@@ -344,7 +344,7 @@ nlmsvc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp) | |||
344 | } | 344 | } |
345 | 345 | ||
346 | int | 346 | int |
347 | nlmsvc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp) | 347 | nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp) |
348 | { | 348 | { |
349 | if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) | 349 | if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) |
350 | return 0; | 350 | return 0; |
@@ -357,7 +357,7 @@ nlmsvc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp) | |||
357 | } | 357 | } |
358 | 358 | ||
359 | int | 359 | int |
360 | nlmsvc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | 360 | nlmsvc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) |
361 | { | 361 | { |
362 | if (!(p = nlm_decode_cookie(p, &resp->cookie))) | 362 | if (!(p = nlm_decode_cookie(p, &resp->cookie))) |
363 | return 0; | 363 | return 0; |
@@ -366,13 +366,13 @@ nlmsvc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | |||
366 | } | 366 | } |
367 | 367 | ||
368 | int | 368 | int |
369 | nlmsvc_decode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) | 369 | nlmsvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) |
370 | { | 370 | { |
371 | return xdr_argsize_check(rqstp, p); | 371 | return xdr_argsize_check(rqstp, p); |
372 | } | 372 | } |
373 | 373 | ||
374 | int | 374 | int |
375 | nlmsvc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) | 375 | nlmsvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) |
376 | { | 376 | { |
377 | return xdr_ressize_check(rqstp, p); | 377 | return xdr_ressize_check(rqstp, p); |
378 | } | 378 | } |
@@ -389,7 +389,7 @@ nlmclt_decode_void(struct rpc_rqst *req, u32 *p, void *ptr) | |||
389 | #endif | 389 | #endif |
390 | 390 | ||
391 | static int | 391 | static int |
392 | nlmclt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | 392 | nlmclt_encode_testargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) |
393 | { | 393 | { |
394 | struct nlm_lock *lock = &argp->lock; | 394 | struct nlm_lock *lock = &argp->lock; |
395 | 395 | ||
@@ -403,7 +403,7 @@ nlmclt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | |||
403 | } | 403 | } |
404 | 404 | ||
405 | static int | 405 | static int |
406 | nlmclt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | 406 | nlmclt_decode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) |
407 | { | 407 | { |
408 | if (!(p = nlm_decode_cookie(p, &resp->cookie))) | 408 | if (!(p = nlm_decode_cookie(p, &resp->cookie))) |
409 | return -EIO; | 409 | return -EIO; |
@@ -438,7 +438,7 @@ nlmclt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | |||
438 | 438 | ||
439 | 439 | ||
440 | static int | 440 | static int |
441 | nlmclt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | 441 | nlmclt_encode_lockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) |
442 | { | 442 | { |
443 | struct nlm_lock *lock = &argp->lock; | 443 | struct nlm_lock *lock = &argp->lock; |
444 | 444 | ||
@@ -455,7 +455,7 @@ nlmclt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | |||
455 | } | 455 | } |
456 | 456 | ||
457 | static int | 457 | static int |
458 | nlmclt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | 458 | nlmclt_encode_cancargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) |
459 | { | 459 | { |
460 | struct nlm_lock *lock = &argp->lock; | 460 | struct nlm_lock *lock = &argp->lock; |
461 | 461 | ||
@@ -470,7 +470,7 @@ nlmclt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | |||
470 | } | 470 | } |
471 | 471 | ||
472 | static int | 472 | static int |
473 | nlmclt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | 473 | nlmclt_encode_unlockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) |
474 | { | 474 | { |
475 | struct nlm_lock *lock = &argp->lock; | 475 | struct nlm_lock *lock = &argp->lock; |
476 | 476 | ||
@@ -483,7 +483,7 @@ nlmclt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | |||
483 | } | 483 | } |
484 | 484 | ||
485 | static int | 485 | static int |
486 | nlmclt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | 486 | nlmclt_encode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) |
487 | { | 487 | { |
488 | if (!(p = nlm_encode_cookie(p, &resp->cookie))) | 488 | if (!(p = nlm_encode_cookie(p, &resp->cookie))) |
489 | return -EIO; | 489 | return -EIO; |
@@ -493,7 +493,7 @@ nlmclt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | |||
493 | } | 493 | } |
494 | 494 | ||
495 | static int | 495 | static int |
496 | nlmclt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | 496 | nlmclt_encode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) |
497 | { | 497 | { |
498 | if (!(p = nlm_encode_testres(p, resp))) | 498 | if (!(p = nlm_encode_testres(p, resp))) |
499 | return -EIO; | 499 | return -EIO; |
@@ -502,7 +502,7 @@ nlmclt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | |||
502 | } | 502 | } |
503 | 503 | ||
504 | static int | 504 | static int |
505 | nlmclt_decode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | 505 | nlmclt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) |
506 | { | 506 | { |
507 | if (!(p = nlm_decode_cookie(p, &resp->cookie))) | 507 | if (!(p = nlm_decode_cookie(p, &resp->cookie))) |
508 | return -EIO; | 508 | return -EIO; |
diff --git a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c index 36eb175ec335..f4c0b2b9f75a 100644 --- a/fs/lockd/xdr4.c +++ b/fs/lockd/xdr4.c | |||
@@ -44,8 +44,8 @@ loff_t_to_s64(loff_t offset) | |||
44 | /* | 44 | /* |
45 | * XDR functions for basic NLM types | 45 | * XDR functions for basic NLM types |
46 | */ | 46 | */ |
47 | static u32 * | 47 | static __be32 * |
48 | nlm4_decode_cookie(u32 *p, struct nlm_cookie *c) | 48 | nlm4_decode_cookie(__be32 *p, struct nlm_cookie *c) |
49 | { | 49 | { |
50 | unsigned int len; | 50 | unsigned int len; |
51 | 51 | ||
@@ -71,8 +71,8 @@ nlm4_decode_cookie(u32 *p, struct nlm_cookie *c) | |||
71 | return p; | 71 | return p; |
72 | } | 72 | } |
73 | 73 | ||
74 | static u32 * | 74 | static __be32 * |
75 | nlm4_encode_cookie(u32 *p, struct nlm_cookie *c) | 75 | nlm4_encode_cookie(__be32 *p, struct nlm_cookie *c) |
76 | { | 76 | { |
77 | *p++ = htonl(c->len); | 77 | *p++ = htonl(c->len); |
78 | memcpy(p, c->data, c->len); | 78 | memcpy(p, c->data, c->len); |
@@ -80,8 +80,8 @@ nlm4_encode_cookie(u32 *p, struct nlm_cookie *c) | |||
80 | return p; | 80 | return p; |
81 | } | 81 | } |
82 | 82 | ||
83 | static u32 * | 83 | static __be32 * |
84 | nlm4_decode_fh(u32 *p, struct nfs_fh *f) | 84 | nlm4_decode_fh(__be32 *p, struct nfs_fh *f) |
85 | { | 85 | { |
86 | memset(f->data, 0, sizeof(f->data)); | 86 | memset(f->data, 0, sizeof(f->data)); |
87 | f->size = ntohl(*p++); | 87 | f->size = ntohl(*p++); |
@@ -95,8 +95,8 @@ nlm4_decode_fh(u32 *p, struct nfs_fh *f) | |||
95 | return p + XDR_QUADLEN(f->size); | 95 | return p + XDR_QUADLEN(f->size); |
96 | } | 96 | } |
97 | 97 | ||
98 | static u32 * | 98 | static __be32 * |
99 | nlm4_encode_fh(u32 *p, struct nfs_fh *f) | 99 | nlm4_encode_fh(__be32 *p, struct nfs_fh *f) |
100 | { | 100 | { |
101 | *p++ = htonl(f->size); | 101 | *p++ = htonl(f->size); |
102 | if (f->size) p[XDR_QUADLEN(f->size)-1] = 0; /* don't leak anything */ | 102 | 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 | /* | 107 | /* |
108 | * Encode and decode owner handle | 108 | * Encode and decode owner handle |
109 | */ | 109 | */ |
110 | static u32 * | 110 | static __be32 * |
111 | nlm4_decode_oh(u32 *p, struct xdr_netobj *oh) | 111 | nlm4_decode_oh(__be32 *p, struct xdr_netobj *oh) |
112 | { | 112 | { |
113 | return xdr_decode_netobj(p, oh); | 113 | return xdr_decode_netobj(p, oh); |
114 | } | 114 | } |
115 | 115 | ||
116 | static u32 * | 116 | static __be32 * |
117 | nlm4_encode_oh(u32 *p, struct xdr_netobj *oh) | 117 | nlm4_encode_oh(__be32 *p, struct xdr_netobj *oh) |
118 | { | 118 | { |
119 | return xdr_encode_netobj(p, oh); | 119 | return xdr_encode_netobj(p, oh); |
120 | } | 120 | } |
121 | 121 | ||
122 | static u32 * | 122 | static __be32 * |
123 | nlm4_decode_lock(u32 *p, struct nlm_lock *lock) | 123 | nlm4_decode_lock(__be32 *p, struct nlm_lock *lock) |
124 | { | 124 | { |
125 | struct file_lock *fl = &lock->fl; | 125 | struct file_lock *fl = &lock->fl; |
126 | __s64 len, start, end; | 126 | __s64 len, start, end; |
@@ -153,8 +153,8 @@ nlm4_decode_lock(u32 *p, struct nlm_lock *lock) | |||
153 | /* | 153 | /* |
154 | * Encode a lock as part of an NLM call | 154 | * Encode a lock as part of an NLM call |
155 | */ | 155 | */ |
156 | static u32 * | 156 | static __be32 * |
157 | nlm4_encode_lock(u32 *p, struct nlm_lock *lock) | 157 | nlm4_encode_lock(__be32 *p, struct nlm_lock *lock) |
158 | { | 158 | { |
159 | struct file_lock *fl = &lock->fl; | 159 | struct file_lock *fl = &lock->fl; |
160 | __s64 start, len; | 160 | __s64 start, len; |
@@ -185,8 +185,8 @@ nlm4_encode_lock(u32 *p, struct nlm_lock *lock) | |||
185 | /* | 185 | /* |
186 | * Encode result of a TEST/TEST_MSG call | 186 | * Encode result of a TEST/TEST_MSG call |
187 | */ | 187 | */ |
188 | static u32 * | 188 | static __be32 * |
189 | nlm4_encode_testres(u32 *p, struct nlm_res *resp) | 189 | nlm4_encode_testres(__be32 *p, struct nlm_res *resp) |
190 | { | 190 | { |
191 | s64 start, len; | 191 | s64 start, len; |
192 | 192 | ||
@@ -227,7 +227,7 @@ nlm4_encode_testres(u32 *p, struct nlm_res *resp) | |||
227 | * First, the server side XDR functions | 227 | * First, the server side XDR functions |
228 | */ | 228 | */ |
229 | int | 229 | int |
230 | nlm4svc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 230 | nlm4svc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
231 | { | 231 | { |
232 | u32 exclusive; | 232 | u32 exclusive; |
233 | 233 | ||
@@ -244,7 +244,7 @@ nlm4svc_decode_testargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
244 | } | 244 | } |
245 | 245 | ||
246 | int | 246 | int |
247 | nlm4svc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | 247 | nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) |
248 | { | 248 | { |
249 | if (!(p = nlm4_encode_testres(p, resp))) | 249 | if (!(p = nlm4_encode_testres(p, resp))) |
250 | return 0; | 250 | return 0; |
@@ -252,7 +252,7 @@ nlm4svc_encode_testres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | |||
252 | } | 252 | } |
253 | 253 | ||
254 | int | 254 | int |
255 | nlm4svc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 255 | nlm4svc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
256 | { | 256 | { |
257 | u32 exclusive; | 257 | u32 exclusive; |
258 | 258 | ||
@@ -272,7 +272,7 @@ nlm4svc_decode_lockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
272 | } | 272 | } |
273 | 273 | ||
274 | int | 274 | int |
275 | nlm4svc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 275 | nlm4svc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
276 | { | 276 | { |
277 | u32 exclusive; | 277 | u32 exclusive; |
278 | 278 | ||
@@ -288,7 +288,7 @@ nlm4svc_decode_cancargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
288 | } | 288 | } |
289 | 289 | ||
290 | int | 290 | int |
291 | nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 291 | nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
292 | { | 292 | { |
293 | if (!(p = nlm4_decode_cookie(p, &argp->cookie)) | 293 | if (!(p = nlm4_decode_cookie(p, &argp->cookie)) |
294 | || !(p = nlm4_decode_lock(p, &argp->lock))) | 294 | || !(p = nlm4_decode_lock(p, &argp->lock))) |
@@ -298,7 +298,7 @@ nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
298 | } | 298 | } |
299 | 299 | ||
300 | int | 300 | int |
301 | nlm4svc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | 301 | nlm4svc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) |
302 | { | 302 | { |
303 | struct nlm_lock *lock = &argp->lock; | 303 | struct nlm_lock *lock = &argp->lock; |
304 | 304 | ||
@@ -319,7 +319,7 @@ nlm4svc_decode_shareargs(struct svc_rqst *rqstp, u32 *p, nlm_args *argp) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | int | 321 | int |
322 | nlm4svc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | 322 | nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) |
323 | { | 323 | { |
324 | if (!(p = nlm4_encode_cookie(p, &resp->cookie))) | 324 | if (!(p = nlm4_encode_cookie(p, &resp->cookie))) |
325 | return 0; | 325 | return 0; |
@@ -329,7 +329,7 @@ nlm4svc_encode_shareres(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | |||
329 | } | 329 | } |
330 | 330 | ||
331 | int | 331 | int |
332 | nlm4svc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | 332 | nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) |
333 | { | 333 | { |
334 | if (!(p = nlm4_encode_cookie(p, &resp->cookie))) | 334 | if (!(p = nlm4_encode_cookie(p, &resp->cookie))) |
335 | return 0; | 335 | return 0; |
@@ -338,7 +338,7 @@ nlm4svc_encode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | |||
338 | } | 338 | } |
339 | 339 | ||
340 | int | 340 | int |
341 | nlm4svc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp) | 341 | nlm4svc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp) |
342 | { | 342 | { |
343 | struct nlm_lock *lock = &argp->lock; | 343 | struct nlm_lock *lock = &argp->lock; |
344 | 344 | ||
@@ -350,7 +350,7 @@ nlm4svc_decode_notify(struct svc_rqst *rqstp, u32 *p, struct nlm_args *argp) | |||
350 | } | 350 | } |
351 | 351 | ||
352 | int | 352 | int |
353 | nlm4svc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp) | 353 | nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp) |
354 | { | 354 | { |
355 | if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) | 355 | if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) |
356 | return 0; | 356 | return 0; |
@@ -363,7 +363,7 @@ nlm4svc_decode_reboot(struct svc_rqst *rqstp, u32 *p, struct nlm_reboot *argp) | |||
363 | } | 363 | } |
364 | 364 | ||
365 | int | 365 | int |
366 | nlm4svc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | 366 | nlm4svc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) |
367 | { | 367 | { |
368 | if (!(p = nlm4_decode_cookie(p, &resp->cookie))) | 368 | if (!(p = nlm4_decode_cookie(p, &resp->cookie))) |
369 | return 0; | 369 | return 0; |
@@ -372,13 +372,13 @@ nlm4svc_decode_res(struct svc_rqst *rqstp, u32 *p, struct nlm_res *resp) | |||
372 | } | 372 | } |
373 | 373 | ||
374 | int | 374 | int |
375 | nlm4svc_decode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) | 375 | nlm4svc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) |
376 | { | 376 | { |
377 | return xdr_argsize_check(rqstp, p); | 377 | return xdr_argsize_check(rqstp, p); |
378 | } | 378 | } |
379 | 379 | ||
380 | int | 380 | int |
381 | nlm4svc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) | 381 | nlm4svc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) |
382 | { | 382 | { |
383 | return xdr_ressize_check(rqstp, p); | 383 | return xdr_ressize_check(rqstp, p); |
384 | } | 384 | } |
@@ -388,14 +388,14 @@ nlm4svc_encode_void(struct svc_rqst *rqstp, u32 *p, void *dummy) | |||
388 | */ | 388 | */ |
389 | #ifdef NLMCLNT_SUPPORT_SHARES | 389 | #ifdef NLMCLNT_SUPPORT_SHARES |
390 | static int | 390 | static int |
391 | nlm4clt_decode_void(struct rpc_rqst *req, u32 *p, void *ptr) | 391 | nlm4clt_decode_void(struct rpc_rqst *req, __be32 *p, void *ptr) |
392 | { | 392 | { |
393 | return 0; | 393 | return 0; |
394 | } | 394 | } |
395 | #endif | 395 | #endif |
396 | 396 | ||
397 | static int | 397 | static int |
398 | nlm4clt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | 398 | nlm4clt_encode_testargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) |
399 | { | 399 | { |
400 | struct nlm_lock *lock = &argp->lock; | 400 | struct nlm_lock *lock = &argp->lock; |
401 | 401 | ||
@@ -409,7 +409,7 @@ nlm4clt_encode_testargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | |||
409 | } | 409 | } |
410 | 410 | ||
411 | static int | 411 | static int |
412 | nlm4clt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | 412 | nlm4clt_decode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) |
413 | { | 413 | { |
414 | if (!(p = nlm4_decode_cookie(p, &resp->cookie))) | 414 | if (!(p = nlm4_decode_cookie(p, &resp->cookie))) |
415 | return -EIO; | 415 | return -EIO; |
@@ -444,7 +444,7 @@ nlm4clt_decode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | |||
444 | 444 | ||
445 | 445 | ||
446 | static int | 446 | static int |
447 | nlm4clt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | 447 | nlm4clt_encode_lockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) |
448 | { | 448 | { |
449 | struct nlm_lock *lock = &argp->lock; | 449 | struct nlm_lock *lock = &argp->lock; |
450 | 450 | ||
@@ -461,7 +461,7 @@ nlm4clt_encode_lockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | |||
461 | } | 461 | } |
462 | 462 | ||
463 | static int | 463 | static int |
464 | nlm4clt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | 464 | nlm4clt_encode_cancargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) |
465 | { | 465 | { |
466 | struct nlm_lock *lock = &argp->lock; | 466 | struct nlm_lock *lock = &argp->lock; |
467 | 467 | ||
@@ -476,7 +476,7 @@ nlm4clt_encode_cancargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | |||
476 | } | 476 | } |
477 | 477 | ||
478 | static int | 478 | static int |
479 | nlm4clt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | 479 | nlm4clt_encode_unlockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) |
480 | { | 480 | { |
481 | struct nlm_lock *lock = &argp->lock; | 481 | struct nlm_lock *lock = &argp->lock; |
482 | 482 | ||
@@ -489,7 +489,7 @@ nlm4clt_encode_unlockargs(struct rpc_rqst *req, u32 *p, nlm_args *argp) | |||
489 | } | 489 | } |
490 | 490 | ||
491 | static int | 491 | static int |
492 | nlm4clt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | 492 | nlm4clt_encode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) |
493 | { | 493 | { |
494 | if (!(p = nlm4_encode_cookie(p, &resp->cookie))) | 494 | if (!(p = nlm4_encode_cookie(p, &resp->cookie))) |
495 | return -EIO; | 495 | return -EIO; |
@@ -499,7 +499,7 @@ nlm4clt_encode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | |||
499 | } | 499 | } |
500 | 500 | ||
501 | static int | 501 | static int |
502 | nlm4clt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | 502 | nlm4clt_encode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) |
503 | { | 503 | { |
504 | if (!(p = nlm4_encode_testres(p, resp))) | 504 | if (!(p = nlm4_encode_testres(p, resp))) |
505 | return -EIO; | 505 | return -EIO; |
@@ -508,7 +508,7 @@ nlm4clt_encode_testres(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | |||
508 | } | 508 | } |
509 | 509 | ||
510 | static int | 510 | static int |
511 | nlm4clt_decode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | 511 | nlm4clt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) |
512 | { | 512 | { |
513 | if (!(p = nlm4_decode_cookie(p, &resp->cookie))) | 513 | if (!(p = nlm4_decode_cookie(p, &resp->cookie))) |
514 | return -EIO; | 514 | return -EIO; |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 2909619c0295..862d9730a60d 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -154,7 +154,7 @@ int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *); | |||
154 | struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); | 154 | struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); |
155 | void nlmclnt_finish_block(struct nlm_wait *block); | 155 | void nlmclnt_finish_block(struct nlm_wait *block); |
156 | int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); | 156 | int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); |
157 | u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *); | 157 | __be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *); |
158 | void nlmclnt_recovery(struct nlm_host *); | 158 | void nlmclnt_recovery(struct nlm_host *); |
159 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); | 159 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); |
160 | void nlmclnt_next_cookie(struct nlm_cookie *); | 160 | 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 | /* | 184 | /* |
185 | * Server-side lock handling | 185 | * Server-side lock handling |
186 | */ | 186 | */ |
187 | u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, | 187 | __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, |
188 | struct nlm_lock *, int, struct nlm_cookie *); | 188 | struct nlm_lock *, int, struct nlm_cookie *); |
189 | u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); | 189 | __be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); |
190 | u32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *, | 190 | __be32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *, |
191 | struct nlm_lock *); | 191 | struct nlm_lock *); |
192 | u32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); | 192 | __be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); |
193 | unsigned long nlmsvc_retry_blocked(void); | 193 | unsigned long nlmsvc_retry_blocked(void); |
194 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, | 194 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, |
195 | nlm_host_match_fn_t match); | 195 | nlm_host_match_fn_t match); |
@@ -198,7 +198,7 @@ void nlmsvc_grant_reply(struct nlm_cookie *, u32); | |||
198 | /* | 198 | /* |
199 | * File handling for the server personality | 199 | * File handling for the server personality |
200 | */ | 200 | */ |
201 | u32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, | 201 | __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, |
202 | struct nfs_fh *); | 202 | struct nfs_fh *); |
203 | void nlm_release_file(struct nlm_file *); | 203 | void nlm_release_file(struct nlm_file *); |
204 | void nlmsvc_mark_resources(void); | 204 | void nlmsvc_mark_resources(void); |
diff --git a/include/linux/lockd/share.h b/include/linux/lockd/share.h index cd7816e74c05..630c5bf69b07 100644 --- a/include/linux/lockd/share.h +++ b/include/linux/lockd/share.h | |||
@@ -21,9 +21,9 @@ struct nlm_share { | |||
21 | u32 s_mode; /* deny mode */ | 21 | u32 s_mode; /* deny mode */ |
22 | }; | 22 | }; |
23 | 23 | ||
24 | u32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *, | 24 | __be32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *, |
25 | struct nlm_args *); | 25 | struct nlm_args *); |
26 | u32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *, | 26 | __be32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *, |
27 | struct nlm_args *); | 27 | struct nlm_args *); |
28 | void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, | 28 | void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, |
29 | nlm_host_match_fn_t); | 29 | nlm_host_match_fn_t); |
diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index 66fdae3b490c..29e7d9fc9dad 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h | |||
@@ -90,19 +90,19 @@ struct nlm_reboot { | |||
90 | */ | 90 | */ |
91 | #define NLMSVC_XDRSIZE sizeof(struct nlm_args) | 91 | #define NLMSVC_XDRSIZE sizeof(struct nlm_args) |
92 | 92 | ||
93 | int nlmsvc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *); | 93 | int nlmsvc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
94 | int nlmsvc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *); | 94 | int nlmsvc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *); |
95 | int nlmsvc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *); | 95 | int nlmsvc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
96 | int nlmsvc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *); | 96 | int nlmsvc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
97 | int nlmsvc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *); | 97 | int nlmsvc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
98 | int nlmsvc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *); | 98 | int nlmsvc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *); |
99 | int nlmsvc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *); | 99 | int nlmsvc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *); |
100 | int nlmsvc_encode_void(struct svc_rqst *, u32 *, void *); | 100 | int nlmsvc_encode_void(struct svc_rqst *, __be32 *, void *); |
101 | int nlmsvc_decode_void(struct svc_rqst *, u32 *, void *); | 101 | int nlmsvc_decode_void(struct svc_rqst *, __be32 *, void *); |
102 | int nlmsvc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *); | 102 | int nlmsvc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
103 | int nlmsvc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *); | 103 | int nlmsvc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *); |
104 | int nlmsvc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *); | 104 | int nlmsvc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *); |
105 | int nlmsvc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *); | 105 | int nlmsvc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *); |
106 | /* | 106 | /* |
107 | int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 107 | int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
108 | int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 108 | int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h index 3cc1ae25009b..dd12b4c9e613 100644 --- a/include/linux/lockd/xdr4.h +++ b/include/linux/lockd/xdr4.h | |||
@@ -23,19 +23,19 @@ | |||
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | int nlm4svc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *); | 26 | int nlm4svc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
27 | int nlm4svc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *); | 27 | int nlm4svc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *); |
28 | int nlm4svc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *); | 28 | int nlm4svc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
29 | int nlm4svc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *); | 29 | int nlm4svc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
30 | int nlm4svc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *); | 30 | int nlm4svc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
31 | int nlm4svc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *); | 31 | int nlm4svc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *); |
32 | int nlm4svc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *); | 32 | int nlm4svc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *); |
33 | int nlm4svc_encode_void(struct svc_rqst *, u32 *, void *); | 33 | int nlm4svc_encode_void(struct svc_rqst *, __be32 *, void *); |
34 | int nlm4svc_decode_void(struct svc_rqst *, u32 *, void *); | 34 | int nlm4svc_decode_void(struct svc_rqst *, __be32 *, void *); |
35 | int nlm4svc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *); | 35 | int nlm4svc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
36 | int nlm4svc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *); | 36 | int nlm4svc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *); |
37 | int nlm4svc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *); | 37 | int nlm4svc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *); |
38 | int nlm4svc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *); | 38 | int nlm4svc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *); |
39 | /* | 39 | /* |
40 | int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 40 | int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
41 | int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 41 | int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); |