diff options
Diffstat (limited to 'fs/nfsd/nfs3proc.c')
-rw-r--r-- | fs/nfsd/nfs3proc.c | 90 |
1 files changed, 47 insertions, 43 deletions
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c index a5ebc7dbb384..64db601c2bd2 100644 --- a/fs/nfsd/nfs3proc.c +++ b/fs/nfsd/nfs3proc.c | |||
@@ -43,7 +43,7 @@ static int nfs3_ftypes[] = { | |||
43 | /* | 43 | /* |
44 | * NULL call. | 44 | * NULL call. |
45 | */ | 45 | */ |
46 | static int | 46 | static __be32 |
47 | nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) | 47 | nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) |
48 | { | 48 | { |
49 | return nfs_ok; | 49 | return nfs_ok; |
@@ -52,11 +52,12 @@ nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) | |||
52 | /* | 52 | /* |
53 | * Get a file's attributes | 53 | * Get a file's attributes |
54 | */ | 54 | */ |
55 | static int | 55 | static __be32 |
56 | nfsd3_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp, | 56 | nfsd3_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp, |
57 | struct nfsd3_attrstat *resp) | 57 | struct nfsd3_attrstat *resp) |
58 | { | 58 | { |
59 | int err, nfserr; | 59 | int err; |
60 | __be32 nfserr; | ||
60 | 61 | ||
61 | dprintk("nfsd: GETATTR(3) %s\n", | 62 | dprintk("nfsd: GETATTR(3) %s\n", |
62 | SVCFH_fmt(&argp->fh)); | 63 | SVCFH_fmt(&argp->fh)); |
@@ -76,11 +77,11 @@ nfsd3_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp, | |||
76 | /* | 77 | /* |
77 | * Set a file's attributes | 78 | * Set a file's attributes |
78 | */ | 79 | */ |
79 | static int | 80 | static __be32 |
80 | nfsd3_proc_setattr(struct svc_rqst *rqstp, struct nfsd3_sattrargs *argp, | 81 | nfsd3_proc_setattr(struct svc_rqst *rqstp, struct nfsd3_sattrargs *argp, |
81 | struct nfsd3_attrstat *resp) | 82 | struct nfsd3_attrstat *resp) |
82 | { | 83 | { |
83 | int nfserr; | 84 | __be32 nfserr; |
84 | 85 | ||
85 | dprintk("nfsd: SETATTR(3) %s\n", | 86 | dprintk("nfsd: SETATTR(3) %s\n", |
86 | SVCFH_fmt(&argp->fh)); | 87 | SVCFH_fmt(&argp->fh)); |
@@ -94,11 +95,11 @@ nfsd3_proc_setattr(struct svc_rqst *rqstp, struct nfsd3_sattrargs *argp, | |||
94 | /* | 95 | /* |
95 | * Look up a path name component | 96 | * Look up a path name component |
96 | */ | 97 | */ |
97 | static int | 98 | static __be32 |
98 | nfsd3_proc_lookup(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, | 99 | nfsd3_proc_lookup(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, |
99 | struct nfsd3_diropres *resp) | 100 | struct nfsd3_diropres *resp) |
100 | { | 101 | { |
101 | int nfserr; | 102 | __be32 nfserr; |
102 | 103 | ||
103 | dprintk("nfsd: LOOKUP(3) %s %.*s\n", | 104 | dprintk("nfsd: LOOKUP(3) %s %.*s\n", |
104 | SVCFH_fmt(&argp->fh), | 105 | SVCFH_fmt(&argp->fh), |
@@ -118,11 +119,11 @@ nfsd3_proc_lookup(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, | |||
118 | /* | 119 | /* |
119 | * Check file access | 120 | * Check file access |
120 | */ | 121 | */ |
121 | static int | 122 | static __be32 |
122 | nfsd3_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp, | 123 | nfsd3_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp, |
123 | struct nfsd3_accessres *resp) | 124 | struct nfsd3_accessres *resp) |
124 | { | 125 | { |
125 | int nfserr; | 126 | __be32 nfserr; |
126 | 127 | ||
127 | dprintk("nfsd: ACCESS(3) %s 0x%x\n", | 128 | dprintk("nfsd: ACCESS(3) %s 0x%x\n", |
128 | SVCFH_fmt(&argp->fh), | 129 | SVCFH_fmt(&argp->fh), |
@@ -137,11 +138,11 @@ nfsd3_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp, | |||
137 | /* | 138 | /* |
138 | * Read a symlink. | 139 | * Read a symlink. |
139 | */ | 140 | */ |
140 | static int | 141 | static __be32 |
141 | nfsd3_proc_readlink(struct svc_rqst *rqstp, struct nfsd3_readlinkargs *argp, | 142 | nfsd3_proc_readlink(struct svc_rqst *rqstp, struct nfsd3_readlinkargs *argp, |
142 | struct nfsd3_readlinkres *resp) | 143 | struct nfsd3_readlinkres *resp) |
143 | { | 144 | { |
144 | int nfserr; | 145 | __be32 nfserr; |
145 | 146 | ||
146 | dprintk("nfsd: READLINK(3) %s\n", SVCFH_fmt(&argp->fh)); | 147 | dprintk("nfsd: READLINK(3) %s\n", SVCFH_fmt(&argp->fh)); |
147 | 148 | ||
@@ -155,11 +156,11 @@ nfsd3_proc_readlink(struct svc_rqst *rqstp, struct nfsd3_readlinkargs *argp, | |||
155 | /* | 156 | /* |
156 | * Read a portion of a file. | 157 | * Read a portion of a file. |
157 | */ | 158 | */ |
158 | static int | 159 | static __be32 |
159 | nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp, | 160 | nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp, |
160 | struct nfsd3_readres *resp) | 161 | struct nfsd3_readres *resp) |
161 | { | 162 | { |
162 | int nfserr; | 163 | __be32 nfserr; |
163 | u32 max_blocksize = svc_max_payload(rqstp); | 164 | u32 max_blocksize = svc_max_payload(rqstp); |
164 | 165 | ||
165 | dprintk("nfsd: READ(3) %s %lu bytes at %lu\n", | 166 | dprintk("nfsd: READ(3) %s %lu bytes at %lu\n", |
@@ -195,11 +196,11 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp, | |||
195 | /* | 196 | /* |
196 | * Write data to a file | 197 | * Write data to a file |
197 | */ | 198 | */ |
198 | static int | 199 | static __be32 |
199 | nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp, | 200 | nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp, |
200 | struct nfsd3_writeres *resp) | 201 | struct nfsd3_writeres *resp) |
201 | { | 202 | { |
202 | int nfserr; | 203 | __be32 nfserr; |
203 | 204 | ||
204 | dprintk("nfsd: WRITE(3) %s %d bytes at %ld%s\n", | 205 | dprintk("nfsd: WRITE(3) %s %d bytes at %ld%s\n", |
205 | SVCFH_fmt(&argp->fh), | 206 | SVCFH_fmt(&argp->fh), |
@@ -223,13 +224,13 @@ nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp, | |||
223 | * At least in theory; we'll see how it fares in practice when the | 224 | * At least in theory; we'll see how it fares in practice when the |
224 | * first reports about SunOS compatibility problems start to pour in... | 225 | * first reports about SunOS compatibility problems start to pour in... |
225 | */ | 226 | */ |
226 | static int | 227 | static __be32 |
227 | nfsd3_proc_create(struct svc_rqst *rqstp, struct nfsd3_createargs *argp, | 228 | nfsd3_proc_create(struct svc_rqst *rqstp, struct nfsd3_createargs *argp, |
228 | struct nfsd3_diropres *resp) | 229 | struct nfsd3_diropres *resp) |
229 | { | 230 | { |
230 | svc_fh *dirfhp, *newfhp = NULL; | 231 | svc_fh *dirfhp, *newfhp = NULL; |
231 | struct iattr *attr; | 232 | struct iattr *attr; |
232 | u32 nfserr; | 233 | __be32 nfserr; |
233 | 234 | ||
234 | dprintk("nfsd: CREATE(3) %s %.*s\n", | 235 | dprintk("nfsd: CREATE(3) %s %.*s\n", |
235 | SVCFH_fmt(&argp->fh), | 236 | SVCFH_fmt(&argp->fh), |
@@ -265,11 +266,11 @@ nfsd3_proc_create(struct svc_rqst *rqstp, struct nfsd3_createargs *argp, | |||
265 | /* | 266 | /* |
266 | * Make directory. This operation is not idempotent. | 267 | * Make directory. This operation is not idempotent. |
267 | */ | 268 | */ |
268 | static int | 269 | static __be32 |
269 | nfsd3_proc_mkdir(struct svc_rqst *rqstp, struct nfsd3_createargs *argp, | 270 | nfsd3_proc_mkdir(struct svc_rqst *rqstp, struct nfsd3_createargs *argp, |
270 | struct nfsd3_diropres *resp) | 271 | struct nfsd3_diropres *resp) |
271 | { | 272 | { |
272 | int nfserr; | 273 | __be32 nfserr; |
273 | 274 | ||
274 | dprintk("nfsd: MKDIR(3) %s %.*s\n", | 275 | dprintk("nfsd: MKDIR(3) %s %.*s\n", |
275 | SVCFH_fmt(&argp->fh), | 276 | SVCFH_fmt(&argp->fh), |
@@ -285,11 +286,11 @@ nfsd3_proc_mkdir(struct svc_rqst *rqstp, struct nfsd3_createargs *argp, | |||
285 | RETURN_STATUS(nfserr); | 286 | RETURN_STATUS(nfserr); |
286 | } | 287 | } |
287 | 288 | ||
288 | static int | 289 | static __be32 |
289 | nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp, | 290 | nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp, |
290 | struct nfsd3_diropres *resp) | 291 | struct nfsd3_diropres *resp) |
291 | { | 292 | { |
292 | int nfserr; | 293 | __be32 nfserr; |
293 | 294 | ||
294 | dprintk("nfsd: SYMLINK(3) %s %.*s -> %.*s\n", | 295 | dprintk("nfsd: SYMLINK(3) %s %.*s -> %.*s\n", |
295 | SVCFH_fmt(&argp->ffh), | 296 | SVCFH_fmt(&argp->ffh), |
@@ -307,11 +308,12 @@ nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp, | |||
307 | /* | 308 | /* |
308 | * Make socket/fifo/device. | 309 | * Make socket/fifo/device. |
309 | */ | 310 | */ |
310 | static int | 311 | static __be32 |
311 | nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp, | 312 | nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp, |
312 | struct nfsd3_diropres *resp) | 313 | struct nfsd3_diropres *resp) |
313 | { | 314 | { |
314 | int nfserr, type; | 315 | __be32 nfserr; |
316 | int type; | ||
315 | dev_t rdev = 0; | 317 | dev_t rdev = 0; |
316 | 318 | ||
317 | dprintk("nfsd: MKNOD(3) %s %.*s\n", | 319 | dprintk("nfsd: MKNOD(3) %s %.*s\n", |
@@ -343,11 +345,11 @@ nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp, | |||
343 | /* | 345 | /* |
344 | * Remove file/fifo/socket etc. | 346 | * Remove file/fifo/socket etc. |
345 | */ | 347 | */ |
346 | static int | 348 | static __be32 |
347 | nfsd3_proc_remove(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, | 349 | nfsd3_proc_remove(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, |
348 | struct nfsd3_attrstat *resp) | 350 | struct nfsd3_attrstat *resp) |
349 | { | 351 | { |
350 | int nfserr; | 352 | __be32 nfserr; |
351 | 353 | ||
352 | dprintk("nfsd: REMOVE(3) %s %.*s\n", | 354 | dprintk("nfsd: REMOVE(3) %s %.*s\n", |
353 | SVCFH_fmt(&argp->fh), | 355 | SVCFH_fmt(&argp->fh), |
@@ -363,11 +365,11 @@ nfsd3_proc_remove(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, | |||
363 | /* | 365 | /* |
364 | * Remove a directory | 366 | * Remove a directory |
365 | */ | 367 | */ |
366 | static int | 368 | static __be32 |
367 | nfsd3_proc_rmdir(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, | 369 | nfsd3_proc_rmdir(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, |
368 | struct nfsd3_attrstat *resp) | 370 | struct nfsd3_attrstat *resp) |
369 | { | 371 | { |
370 | int nfserr; | 372 | __be32 nfserr; |
371 | 373 | ||
372 | dprintk("nfsd: RMDIR(3) %s %.*s\n", | 374 | dprintk("nfsd: RMDIR(3) %s %.*s\n", |
373 | SVCFH_fmt(&argp->fh), | 375 | SVCFH_fmt(&argp->fh), |
@@ -379,11 +381,11 @@ nfsd3_proc_rmdir(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp, | |||
379 | RETURN_STATUS(nfserr); | 381 | RETURN_STATUS(nfserr); |
380 | } | 382 | } |
381 | 383 | ||
382 | static int | 384 | static __be32 |
383 | nfsd3_proc_rename(struct svc_rqst *rqstp, struct nfsd3_renameargs *argp, | 385 | nfsd3_proc_rename(struct svc_rqst *rqstp, struct nfsd3_renameargs *argp, |
384 | struct nfsd3_renameres *resp) | 386 | struct nfsd3_renameres *resp) |
385 | { | 387 | { |
386 | int nfserr; | 388 | __be32 nfserr; |
387 | 389 | ||
388 | dprintk("nfsd: RENAME(3) %s %.*s ->\n", | 390 | dprintk("nfsd: RENAME(3) %s %.*s ->\n", |
389 | SVCFH_fmt(&argp->ffh), | 391 | SVCFH_fmt(&argp->ffh), |
@@ -401,11 +403,11 @@ nfsd3_proc_rename(struct svc_rqst *rqstp, struct nfsd3_renameargs *argp, | |||
401 | RETURN_STATUS(nfserr); | 403 | RETURN_STATUS(nfserr); |
402 | } | 404 | } |
403 | 405 | ||
404 | static int | 406 | static __be32 |
405 | nfsd3_proc_link(struct svc_rqst *rqstp, struct nfsd3_linkargs *argp, | 407 | nfsd3_proc_link(struct svc_rqst *rqstp, struct nfsd3_linkargs *argp, |
406 | struct nfsd3_linkres *resp) | 408 | struct nfsd3_linkres *resp) |
407 | { | 409 | { |
408 | int nfserr; | 410 | __be32 nfserr; |
409 | 411 | ||
410 | dprintk("nfsd: LINK(3) %s ->\n", | 412 | dprintk("nfsd: LINK(3) %s ->\n", |
411 | SVCFH_fmt(&argp->ffh)); | 413 | SVCFH_fmt(&argp->ffh)); |
@@ -424,11 +426,12 @@ nfsd3_proc_link(struct svc_rqst *rqstp, struct nfsd3_linkargs *argp, | |||
424 | /* | 426 | /* |
425 | * Read a portion of a directory. | 427 | * Read a portion of a directory. |
426 | */ | 428 | */ |
427 | static int | 429 | static __be32 |
428 | nfsd3_proc_readdir(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp, | 430 | nfsd3_proc_readdir(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp, |
429 | struct nfsd3_readdirres *resp) | 431 | struct nfsd3_readdirres *resp) |
430 | { | 432 | { |
431 | int nfserr, count; | 433 | __be32 nfserr; |
434 | int count; | ||
432 | 435 | ||
433 | dprintk("nfsd: READDIR(3) %s %d bytes at %d\n", | 436 | dprintk("nfsd: READDIR(3) %s %d bytes at %d\n", |
434 | SVCFH_fmt(&argp->fh), | 437 | SVCFH_fmt(&argp->fh), |
@@ -459,11 +462,12 @@ nfsd3_proc_readdir(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp, | |||
459 | * Read a portion of a directory, including file handles and attrs. | 462 | * Read a portion of a directory, including file handles and attrs. |
460 | * For now, we choose to ignore the dircount parameter. | 463 | * For now, we choose to ignore the dircount parameter. |
461 | */ | 464 | */ |
462 | static int | 465 | static __be32 |
463 | nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp, | 466 | nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp, |
464 | struct nfsd3_readdirres *resp) | 467 | struct nfsd3_readdirres *resp) |
465 | { | 468 | { |
466 | int nfserr, count = 0; | 469 | __be32 nfserr; |
470 | int count = 0; | ||
467 | loff_t offset; | 471 | loff_t offset; |
468 | int i; | 472 | int i; |
469 | caddr_t page_addr = NULL; | 473 | caddr_t page_addr = NULL; |
@@ -517,11 +521,11 @@ nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp, | |||
517 | /* | 521 | /* |
518 | * Get file system stats | 522 | * Get file system stats |
519 | */ | 523 | */ |
520 | static int | 524 | static __be32 |
521 | nfsd3_proc_fsstat(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, | 525 | nfsd3_proc_fsstat(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, |
522 | struct nfsd3_fsstatres *resp) | 526 | struct nfsd3_fsstatres *resp) |
523 | { | 527 | { |
524 | int nfserr; | 528 | __be32 nfserr; |
525 | 529 | ||
526 | dprintk("nfsd: FSSTAT(3) %s\n", | 530 | dprintk("nfsd: FSSTAT(3) %s\n", |
527 | SVCFH_fmt(&argp->fh)); | 531 | SVCFH_fmt(&argp->fh)); |
@@ -534,11 +538,11 @@ nfsd3_proc_fsstat(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, | |||
534 | /* | 538 | /* |
535 | * Get file system info | 539 | * Get file system info |
536 | */ | 540 | */ |
537 | static int | 541 | static __be32 |
538 | nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, | 542 | nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, |
539 | struct nfsd3_fsinfores *resp) | 543 | struct nfsd3_fsinfores *resp) |
540 | { | 544 | { |
541 | int nfserr; | 545 | __be32 nfserr; |
542 | u32 max_blocksize = svc_max_payload(rqstp); | 546 | u32 max_blocksize = svc_max_payload(rqstp); |
543 | 547 | ||
544 | dprintk("nfsd: FSINFO(3) %s\n", | 548 | dprintk("nfsd: FSINFO(3) %s\n", |
@@ -576,11 +580,11 @@ nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, | |||
576 | /* | 580 | /* |
577 | * Get pathconf info for the specified file | 581 | * Get pathconf info for the specified file |
578 | */ | 582 | */ |
579 | static int | 583 | static __be32 |
580 | nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, | 584 | nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, |
581 | struct nfsd3_pathconfres *resp) | 585 | struct nfsd3_pathconfres *resp) |
582 | { | 586 | { |
583 | int nfserr; | 587 | __be32 nfserr; |
584 | 588 | ||
585 | dprintk("nfsd: PATHCONF(3) %s\n", | 589 | dprintk("nfsd: PATHCONF(3) %s\n", |
586 | SVCFH_fmt(&argp->fh)); | 590 | SVCFH_fmt(&argp->fh)); |
@@ -619,11 +623,11 @@ nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle *argp, | |||
619 | /* | 623 | /* |
620 | * Commit a file (range) to stable storage. | 624 | * Commit a file (range) to stable storage. |
621 | */ | 625 | */ |
622 | static int | 626 | static __be32 |
623 | nfsd3_proc_commit(struct svc_rqst * rqstp, struct nfsd3_commitargs *argp, | 627 | nfsd3_proc_commit(struct svc_rqst * rqstp, struct nfsd3_commitargs *argp, |
624 | struct nfsd3_commitres *resp) | 628 | struct nfsd3_commitres *resp) |
625 | { | 629 | { |
626 | int nfserr; | 630 | __be32 nfserr; |
627 | 631 | ||
628 | dprintk("nfsd: COMMIT(3) %s %u@%Lu\n", | 632 | dprintk("nfsd: COMMIT(3) %s %u@%Lu\n", |
629 | SVCFH_fmt(&argp->fh), | 633 | SVCFH_fmt(&argp->fh), |