nfssvc.c (831441862956fffa17b9801db37e6ea1650b0f69) nfssvc.c (32c1eb0cd7ee00b5eb7b6f7059c635fbc1052966)
1/*
2 * linux/fs/nfsd/nfssvc.c
3 *
4 * Central processing for nfsd.
5 *
6 * Authors: Olaf Kirch (okir@monad.swb.de)
7 *
8 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>

--- 480 unchanged lines hidden (view full) ---

489 /* Release the thread */
490 svc_exit_thread(rqstp);
491
492 /* Release module */
493 unlock_kernel();
494 module_put_and_exit(0);
495}
496
1/*
2 * linux/fs/nfsd/nfssvc.c
3 *
4 * Central processing for nfsd.
5 *
6 * Authors: Olaf Kirch (okir@monad.swb.de)
7 *
8 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>

--- 480 unchanged lines hidden (view full) ---

489 /* Release the thread */
490 svc_exit_thread(rqstp);
491
492 /* Release module */
493 unlock_kernel();
494 module_put_and_exit(0);
495}
496
497static __be32 map_new_errors(u32 vers, __be32 nfserr)
498{
499 if (nfserr == nfserr_jukebox && vers == 2)
500 return nfserr_dropit;
501 if (nfserr == nfserr_wrongsec && vers < 4)
502 return nfserr_acces;
503 return nfserr;
504}
505
497int
498nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
499{
500 struct svc_procedure *proc;
501 kxdrproc_t xdr;
502 __be32 nfserr;
503 __be32 *nfserrp;
504

--- 26 unchanged lines hidden (view full) ---

531 * nfsv4 does some encoding while processing
532 */
533 nfserrp = rqstp->rq_res.head[0].iov_base
534 + rqstp->rq_res.head[0].iov_len;
535 rqstp->rq_res.head[0].iov_len += sizeof(__be32);
536
537 /* Now call the procedure handler, and encode NFS status. */
538 nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
506int
507nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
508{
509 struct svc_procedure *proc;
510 kxdrproc_t xdr;
511 __be32 nfserr;
512 __be32 *nfserrp;
513

--- 26 unchanged lines hidden (view full) ---

540 * nfsv4 does some encoding while processing
541 */
542 nfserrp = rqstp->rq_res.head[0].iov_base
543 + rqstp->rq_res.head[0].iov_len;
544 rqstp->rq_res.head[0].iov_len += sizeof(__be32);
545
546 /* Now call the procedure handler, and encode NFS status. */
547 nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
548 nfserr = map_new_errors(rqstp->rq_vers, nfserr);
539 if (nfserr == nfserr_jukebox && rqstp->rq_vers == 2)
540 nfserr = nfserr_dropit;
541 if (nfserr == nfserr_dropit) {
542 dprintk("nfsd: Dropping request due to malloc failure!\n");
543 nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
544 return 0;
545 }
546

--- 22 unchanged lines hidden ---
549 if (nfserr == nfserr_jukebox && rqstp->rq_vers == 2)
550 nfserr = nfserr_dropit;
551 if (nfserr == nfserr_dropit) {
552 dprintk("nfsd: Dropping request due to malloc failure!\n");
553 nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
554 return 0;
555 }
556

--- 22 unchanged lines hidden ---