diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 66 |
2 files changed, 34 insertions, 34 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 795ad6c5cb2c..ca6414248527 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -664,7 +664,7 @@ nfsd4_write(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_writ | |||
664 | static int | 664 | static int |
665 | nfsd4_verify(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_verify *verify) | 665 | nfsd4_verify(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_verify *verify) |
666 | { | 666 | { |
667 | u32 *buf, *p; | 667 | __be32 *buf, *p; |
668 | int count; | 668 | int count; |
669 | int status; | 669 | int status; |
670 | 670 | ||
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 77be0c4785e6..3419d99aeb1a 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -94,7 +94,7 @@ check_filename(char *str, int len, int err) | |||
94 | * consistent with the style used in NFSv2/v3... | 94 | * consistent with the style used in NFSv2/v3... |
95 | */ | 95 | */ |
96 | #define DECODE_HEAD \ | 96 | #define DECODE_HEAD \ |
97 | u32 *p; \ | 97 | __be32 *p; \ |
98 | int status | 98 | int status |
99 | #define DECODE_TAIL \ | 99 | #define DECODE_TAIL \ |
100 | status = 0; \ | 100 | status = 0; \ |
@@ -144,13 +144,13 @@ xdr_error: \ | |||
144 | } \ | 144 | } \ |
145 | } while (0) | 145 | } while (0) |
146 | 146 | ||
147 | static u32 *read_buf(struct nfsd4_compoundargs *argp, int nbytes) | 147 | static __be32 *read_buf(struct nfsd4_compoundargs *argp, int nbytes) |
148 | { | 148 | { |
149 | /* We want more bytes than seem to be available. | 149 | /* We want more bytes than seem to be available. |
150 | * Maybe we need a new page, maybe we have just run out | 150 | * Maybe we need a new page, maybe we have just run out |
151 | */ | 151 | */ |
152 | int avail = (char*)argp->end - (char*)argp->p; | 152 | int avail = (char*)argp->end - (char*)argp->p; |
153 | u32 *p; | 153 | __be32 *p; |
154 | if (avail + argp->pagelen < nbytes) | 154 | if (avail + argp->pagelen < nbytes) |
155 | return NULL; | 155 | return NULL; |
156 | if (avail + PAGE_SIZE < nbytes) /* need more than a page !! */ | 156 | if (avail + PAGE_SIZE < nbytes) /* need more than a page !! */ |
@@ -197,7 +197,7 @@ defer_free(struct nfsd4_compoundargs *argp, | |||
197 | return 0; | 197 | return 0; |
198 | } | 198 | } |
199 | 199 | ||
200 | static char *savemem(struct nfsd4_compoundargs *argp, u32 *p, int nbytes) | 200 | static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) |
201 | { | 201 | { |
202 | void *new = NULL; | 202 | void *new = NULL; |
203 | if (p == argp->tmp) { | 203 | if (p == argp->tmp) { |
@@ -951,8 +951,8 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write) | |||
951 | argp->pagelen -= len; | 951 | argp->pagelen -= len; |
952 | } | 952 | } |
953 | } | 953 | } |
954 | argp->end = (u32*) (argp->rqstp->rq_vec[v].iov_base + argp->rqstp->rq_vec[v].iov_len); | 954 | argp->end = (__be32*) (argp->rqstp->rq_vec[v].iov_base + argp->rqstp->rq_vec[v].iov_len); |
955 | argp->p = (u32*) (argp->rqstp->rq_vec[v].iov_base + (XDR_QUADLEN(len) << 2)); | 955 | argp->p = (__be32*) (argp->rqstp->rq_vec[v].iov_base + (XDR_QUADLEN(len) << 2)); |
956 | argp->rqstp->rq_vec[v].iov_len = len; | 956 | argp->rqstp->rq_vec[v].iov_len = len; |
957 | write->wr_vlen = v+1; | 957 | write->wr_vlen = v+1; |
958 | 958 | ||
@@ -1179,7 +1179,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) | |||
1179 | * task to translate them into Linux-specific versions which are more | 1179 | * task to translate them into Linux-specific versions which are more |
1180 | * consistent with the style used in NFSv2/v3... | 1180 | * consistent with the style used in NFSv2/v3... |
1181 | */ | 1181 | */ |
1182 | #define ENCODE_HEAD u32 *p | 1182 | #define ENCODE_HEAD __be32 *p |
1183 | 1183 | ||
1184 | #define WRITE32(n) *p++ = htonl(n) | 1184 | #define WRITE32(n) *p++ = htonl(n) |
1185 | #define WRITE64(n) do { \ | 1185 | #define WRITE64(n) do { \ |
@@ -1209,8 +1209,8 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) | |||
1209 | * Header routine to setup seqid operation replay cache | 1209 | * Header routine to setup seqid operation replay cache |
1210 | */ | 1210 | */ |
1211 | #define ENCODE_SEQID_OP_HEAD \ | 1211 | #define ENCODE_SEQID_OP_HEAD \ |
1212 | u32 *p; \ | 1212 | __be32 *p; \ |
1213 | u32 *save; \ | 1213 | __be32 *save; \ |
1214 | \ | 1214 | \ |
1215 | save = resp->p; | 1215 | save = resp->p; |
1216 | 1216 | ||
@@ -1235,10 +1235,10 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) | |||
1235 | * seperated @sep. | 1235 | * seperated @sep. |
1236 | */ | 1236 | */ |
1237 | static int nfsd4_encode_components(char sep, char *components, | 1237 | static int nfsd4_encode_components(char sep, char *components, |
1238 | u32 **pp, int *buflen) | 1238 | __be32 **pp, int *buflen) |
1239 | { | 1239 | { |
1240 | u32 *p = *pp; | 1240 | __be32 *p = *pp; |
1241 | u32 *countp = p; | 1241 | __be32 *countp = p; |
1242 | int strlen, count=0; | 1242 | int strlen, count=0; |
1243 | char *str, *end; | 1243 | char *str, *end; |
1244 | 1244 | ||
@@ -1272,10 +1272,10 @@ static int nfsd4_encode_components(char sep, char *components, | |||
1272 | * encode a location element of a fs_locations structure | 1272 | * encode a location element of a fs_locations structure |
1273 | */ | 1273 | */ |
1274 | static int nfsd4_encode_fs_location4(struct nfsd4_fs_location *location, | 1274 | static int nfsd4_encode_fs_location4(struct nfsd4_fs_location *location, |
1275 | u32 **pp, int *buflen) | 1275 | __be32 **pp, int *buflen) |
1276 | { | 1276 | { |
1277 | int status; | 1277 | int status; |
1278 | u32 *p = *pp; | 1278 | __be32 *p = *pp; |
1279 | 1279 | ||
1280 | status = nfsd4_encode_components(':', location->hosts, &p, buflen); | 1280 | status = nfsd4_encode_components(':', location->hosts, &p, buflen); |
1281 | if (status) | 1281 | if (status) |
@@ -1320,11 +1320,11 @@ static char *nfsd4_path(struct svc_rqst *rqstp, struct svc_export *exp, u32 *sta | |||
1320 | */ | 1320 | */ |
1321 | static int nfsd4_encode_fs_locations(struct svc_rqst *rqstp, | 1321 | static int nfsd4_encode_fs_locations(struct svc_rqst *rqstp, |
1322 | struct svc_export *exp, | 1322 | struct svc_export *exp, |
1323 | u32 **pp, int *buflen) | 1323 | __be32 **pp, int *buflen) |
1324 | { | 1324 | { |
1325 | u32 status; | 1325 | u32 status; |
1326 | int i; | 1326 | int i; |
1327 | u32 *p = *pp; | 1327 | __be32 *p = *pp; |
1328 | struct nfsd4_fs_locations *fslocs = &exp->ex_fslocs; | 1328 | struct nfsd4_fs_locations *fslocs = &exp->ex_fslocs; |
1329 | char *root = nfsd4_path(rqstp, exp, &status); | 1329 | char *root = nfsd4_path(rqstp, exp, &status); |
1330 | 1330 | ||
@@ -1355,7 +1355,7 @@ static u32 nfs4_ftypes[16] = { | |||
1355 | 1355 | ||
1356 | static int | 1356 | static int |
1357 | nfsd4_encode_name(struct svc_rqst *rqstp, int whotype, uid_t id, int group, | 1357 | nfsd4_encode_name(struct svc_rqst *rqstp, int whotype, uid_t id, int group, |
1358 | u32 **p, int *buflen) | 1358 | __be32 **p, int *buflen) |
1359 | { | 1359 | { |
1360 | int status; | 1360 | int status; |
1361 | 1361 | ||
@@ -1376,20 +1376,20 @@ nfsd4_encode_name(struct svc_rqst *rqstp, int whotype, uid_t id, int group, | |||
1376 | } | 1376 | } |
1377 | 1377 | ||
1378 | static inline int | 1378 | static inline int |
1379 | nfsd4_encode_user(struct svc_rqst *rqstp, uid_t uid, u32 **p, int *buflen) | 1379 | nfsd4_encode_user(struct svc_rqst *rqstp, uid_t uid, __be32 **p, int *buflen) |
1380 | { | 1380 | { |
1381 | return nfsd4_encode_name(rqstp, NFS4_ACL_WHO_NAMED, uid, 0, p, buflen); | 1381 | return nfsd4_encode_name(rqstp, NFS4_ACL_WHO_NAMED, uid, 0, p, buflen); |
1382 | } | 1382 | } |
1383 | 1383 | ||
1384 | static inline int | 1384 | static inline int |
1385 | nfsd4_encode_group(struct svc_rqst *rqstp, uid_t gid, u32 **p, int *buflen) | 1385 | nfsd4_encode_group(struct svc_rqst *rqstp, uid_t gid, __be32 **p, int *buflen) |
1386 | { | 1386 | { |
1387 | return nfsd4_encode_name(rqstp, NFS4_ACL_WHO_NAMED, gid, 1, p, buflen); | 1387 | return nfsd4_encode_name(rqstp, NFS4_ACL_WHO_NAMED, gid, 1, p, buflen); |
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | static inline int | 1390 | static inline int |
1391 | nfsd4_encode_aclname(struct svc_rqst *rqstp, int whotype, uid_t id, int group, | 1391 | nfsd4_encode_aclname(struct svc_rqst *rqstp, int whotype, uid_t id, int group, |
1392 | u32 **p, int *buflen) | 1392 | __be32 **p, int *buflen) |
1393 | { | 1393 | { |
1394 | return nfsd4_encode_name(rqstp, whotype, id, group, p, buflen); | 1394 | return nfsd4_encode_name(rqstp, whotype, id, group, p, buflen); |
1395 | } | 1395 | } |
@@ -1423,7 +1423,7 @@ static int fattr_handle_absent_fs(u32 *bmval0, u32 *bmval1, u32 *rdattr_err) | |||
1423 | */ | 1423 | */ |
1424 | int | 1424 | int |
1425 | nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | 1425 | nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, |
1426 | struct dentry *dentry, u32 *buffer, int *countp, u32 *bmval, | 1426 | struct dentry *dentry, __be32 *buffer, int *countp, u32 *bmval, |
1427 | struct svc_rqst *rqstp) | 1427 | struct svc_rqst *rqstp) |
1428 | { | 1428 | { |
1429 | u32 bmval0 = bmval[0]; | 1429 | u32 bmval0 = bmval[0]; |
@@ -1432,11 +1432,11 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | |||
1432 | struct svc_fh tempfh; | 1432 | struct svc_fh tempfh; |
1433 | struct kstatfs statfs; | 1433 | struct kstatfs statfs; |
1434 | int buflen = *countp << 2; | 1434 | int buflen = *countp << 2; |
1435 | u32 *attrlenp; | 1435 | __be32 *attrlenp; |
1436 | u32 dummy; | 1436 | u32 dummy; |
1437 | u64 dummy64; | 1437 | u64 dummy64; |
1438 | u32 rdattr_err = 0; | 1438 | u32 rdattr_err = 0; |
1439 | u32 *p = buffer; | 1439 | __be32 *p = buffer; |
1440 | int status; | 1440 | int status; |
1441 | int aclsupport = 0; | 1441 | int aclsupport = 0; |
1442 | struct nfs4_acl *acl = NULL; | 1442 | struct nfs4_acl *acl = NULL; |
@@ -1831,7 +1831,7 @@ out_serverfault: | |||
1831 | 1831 | ||
1832 | static int | 1832 | static int |
1833 | nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd, | 1833 | nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd, |
1834 | const char *name, int namlen, u32 *p, int *buflen) | 1834 | const char *name, int namlen, __be32 *p, int *buflen) |
1835 | { | 1835 | { |
1836 | struct svc_export *exp = cd->rd_fhp->fh_export; | 1836 | struct svc_export *exp = cd->rd_fhp->fh_export; |
1837 | struct dentry *dentry; | 1837 | struct dentry *dentry; |
@@ -1864,10 +1864,10 @@ out_put: | |||
1864 | return nfserr; | 1864 | return nfserr; |
1865 | } | 1865 | } |
1866 | 1866 | ||
1867 | static u32 * | 1867 | static __be32 * |
1868 | nfsd4_encode_rdattr_error(u32 *p, int buflen, int nfserr) | 1868 | nfsd4_encode_rdattr_error(__be32 *p, int buflen, int nfserr) |
1869 | { | 1869 | { |
1870 | u32 *attrlenp; | 1870 | __be32 *attrlenp; |
1871 | 1871 | ||
1872 | if (buflen < 6) | 1872 | if (buflen < 6) |
1873 | return NULL; | 1873 | return NULL; |
@@ -1887,7 +1887,7 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen, | |||
1887 | { | 1887 | { |
1888 | struct nfsd4_readdir *cd = container_of(ccd, struct nfsd4_readdir, common); | 1888 | struct nfsd4_readdir *cd = container_of(ccd, struct nfsd4_readdir, common); |
1889 | int buflen; | 1889 | int buflen; |
1890 | u32 *p = cd->buffer; | 1890 | __be32 *p = cd->buffer; |
1891 | int nfserr = nfserr_toosmall; | 1891 | int nfserr = nfserr_toosmall; |
1892 | 1892 | ||
1893 | /* In nfsv4, "." and ".." never make it onto the wire.. */ | 1893 | /* In nfsv4, "." and ".." never make it onto the wire.. */ |
@@ -2321,7 +2321,7 @@ nfsd4_encode_readdir(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_re | |||
2321 | { | 2321 | { |
2322 | int maxcount; | 2322 | int maxcount; |
2323 | loff_t offset; | 2323 | loff_t offset; |
2324 | u32 *page, *savep, *tailbase; | 2324 | __be32 *page, *savep, *tailbase; |
2325 | ENCODE_HEAD; | 2325 | ENCODE_HEAD; |
2326 | 2326 | ||
2327 | if (nfserr) | 2327 | if (nfserr) |
@@ -2479,7 +2479,7 @@ nfsd4_encode_write(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_writ | |||
2479 | void | 2479 | void |
2480 | nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op) | 2480 | nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op) |
2481 | { | 2481 | { |
2482 | u32 *statp; | 2482 | __be32 *statp; |
2483 | ENCODE_HEAD; | 2483 | ENCODE_HEAD; |
2484 | 2484 | ||
2485 | RESERVE_SPACE(8); | 2485 | RESERVE_SPACE(8); |
@@ -2617,7 +2617,7 @@ nfsd4_encode_replay(struct nfsd4_compoundres *resp, struct nfsd4_op *op) | |||
2617 | */ | 2617 | */ |
2618 | 2618 | ||
2619 | int | 2619 | int |
2620 | nfs4svc_encode_voidres(struct svc_rqst *rqstp, u32 *p, void *dummy) | 2620 | nfs4svc_encode_voidres(struct svc_rqst *rqstp, __be32 *p, void *dummy) |
2621 | { | 2621 | { |
2622 | return xdr_ressize_check(rqstp, p); | 2622 | return xdr_ressize_check(rqstp, p); |
2623 | } | 2623 | } |
@@ -2639,7 +2639,7 @@ void nfsd4_release_compoundargs(struct nfsd4_compoundargs *args) | |||
2639 | } | 2639 | } |
2640 | 2640 | ||
2641 | int | 2641 | int |
2642 | nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, u32 *p, struct nfsd4_compoundargs *args) | 2642 | nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundargs *args) |
2643 | { | 2643 | { |
2644 | int status; | 2644 | int status; |
2645 | 2645 | ||
@@ -2660,7 +2660,7 @@ nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, u32 *p, struct nfsd4_compoun | |||
2660 | } | 2660 | } |
2661 | 2661 | ||
2662 | int | 2662 | int |
2663 | nfs4svc_encode_compoundres(struct svc_rqst *rqstp, u32 *p, struct nfsd4_compoundres *resp) | 2663 | nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundres *resp) |
2664 | { | 2664 | { |
2665 | /* | 2665 | /* |
2666 | * All that remains is to write the tag and operation count... | 2666 | * All that remains is to write the tag and operation count... |