diff options
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 979ebd7af3cb..697e07235f30 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -340,18 +340,16 @@ static int decode_fhandle(struct xdr_stream *xdr, struct mountres *res) | |||
340 | return 0; | 340 | return 0; |
341 | } | 341 | } |
342 | 342 | ||
343 | static int mnt_dec_mountres(struct rpc_rqst *req, __be32 *p, | 343 | static int mnt_xdr_dec_mountres(struct rpc_rqst *req, |
344 | struct mountres *res) | 344 | struct xdr_stream *xdr, |
345 | struct mountres *res) | ||
345 | { | 346 | { |
346 | struct xdr_stream xdr; | ||
347 | int status; | 347 | int status; |
348 | 348 | ||
349 | xdr_init_decode(&xdr, &req->rq_rcv_buf, p); | 349 | status = decode_status(xdr, res); |
350 | |||
351 | status = decode_status(&xdr, res); | ||
352 | if (unlikely(status != 0 || res->errno != 0)) | 350 | if (unlikely(status != 0 || res->errno != 0)) |
353 | return status; | 351 | return status; |
354 | return decode_fhandle(&xdr, res); | 352 | return decode_fhandle(xdr, res); |
355 | } | 353 | } |
356 | 354 | ||
357 | static int decode_fhs_status(struct xdr_stream *xdr, struct mountres *res) | 355 | static int decode_fhs_status(struct xdr_stream *xdr, struct mountres *res) |
@@ -434,30 +432,28 @@ static int decode_auth_flavors(struct xdr_stream *xdr, struct mountres *res) | |||
434 | return 0; | 432 | return 0; |
435 | } | 433 | } |
436 | 434 | ||
437 | static int mnt_dec_mountres3(struct rpc_rqst *req, __be32 *p, | 435 | static int mnt_xdr_dec_mountres3(struct rpc_rqst *req, |
438 | struct mountres *res) | 436 | struct xdr_stream *xdr, |
437 | struct mountres *res) | ||
439 | { | 438 | { |
440 | struct xdr_stream xdr; | ||
441 | int status; | 439 | int status; |
442 | 440 | ||
443 | xdr_init_decode(&xdr, &req->rq_rcv_buf, p); | 441 | status = decode_fhs_status(xdr, res); |
444 | |||
445 | status = decode_fhs_status(&xdr, res); | ||
446 | if (unlikely(status != 0 || res->errno != 0)) | 442 | if (unlikely(status != 0 || res->errno != 0)) |
447 | return status; | 443 | return status; |
448 | status = decode_fhandle3(&xdr, res); | 444 | status = decode_fhandle3(xdr, res); |
449 | if (unlikely(status != 0)) { | 445 | if (unlikely(status != 0)) { |
450 | res->errno = -EBADHANDLE; | 446 | res->errno = -EBADHANDLE; |
451 | return 0; | 447 | return 0; |
452 | } | 448 | } |
453 | return decode_auth_flavors(&xdr, res); | 449 | return decode_auth_flavors(xdr, res); |
454 | } | 450 | } |
455 | 451 | ||
456 | static struct rpc_procinfo mnt_procedures[] = { | 452 | static struct rpc_procinfo mnt_procedures[] = { |
457 | [MOUNTPROC_MNT] = { | 453 | [MOUNTPROC_MNT] = { |
458 | .p_proc = MOUNTPROC_MNT, | 454 | .p_proc = MOUNTPROC_MNT, |
459 | .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath, | 455 | .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath, |
460 | .p_decode = (kxdrproc_t)mnt_dec_mountres, | 456 | .p_decode = (kxdrdproc_t)mnt_xdr_dec_mountres, |
461 | .p_arglen = MNT_enc_dirpath_sz, | 457 | .p_arglen = MNT_enc_dirpath_sz, |
462 | .p_replen = MNT_dec_mountres_sz, | 458 | .p_replen = MNT_dec_mountres_sz, |
463 | .p_statidx = MOUNTPROC_MNT, | 459 | .p_statidx = MOUNTPROC_MNT, |
@@ -476,7 +472,7 @@ static struct rpc_procinfo mnt3_procedures[] = { | |||
476 | [MOUNTPROC3_MNT] = { | 472 | [MOUNTPROC3_MNT] = { |
477 | .p_proc = MOUNTPROC3_MNT, | 473 | .p_proc = MOUNTPROC3_MNT, |
478 | .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath, | 474 | .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath, |
479 | .p_decode = (kxdrproc_t)mnt_dec_mountres3, | 475 | .p_decode = (kxdrdproc_t)mnt_xdr_dec_mountres3, |
480 | .p_arglen = MNT_enc_dirpath_sz, | 476 | .p_arglen = MNT_enc_dirpath_sz, |
481 | .p_replen = MNT_dec_mountres3_sz, | 477 | .p_replen = MNT_dec_mountres3_sz, |
482 | .p_statidx = MOUNTPROC3_MNT, | 478 | .p_statidx = MOUNTPROC3_MNT, |