nfsd: open-code special directory-hardlink check
[deliverable/linux.git] / fs / nfsd / nfssvc.c
index 18743c4d8bca848d493829f6385127f8e89508eb..dc5a1bf476b1185feb4b7f66a5e4fcd4c48b034b 100644 (file)
@@ -528,16 +528,9 @@ nfsd(void *vrqstp)
                        continue;
                }
 
-
-               /* Lock the export hash tables for reading. */
-               exp_readlock();
-
                validate_process_creds();
                svc_process(rqstp);
                validate_process_creds();
-
-               /* Unlock export hash tables */
-               exp_readunlock();
        }
 
        /* Clear signals before calling svc_exit_thread() */
@@ -577,8 +570,22 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
                                rqstp->rq_vers, rqstp->rq_proc);
        proc = rqstp->rq_procinfo;
 
+       /*
+        * Give the xdr decoder a chance to change this if it wants
+        * (necessary in the NFSv4.0 compound case)
+        */
+       rqstp->rq_cachetype = proc->pc_cachetype;
+       /* Decode arguments */
+       xdr = proc->pc_decode;
+       if (xdr && !xdr(rqstp, (__be32*)rqstp->rq_arg.head[0].iov_base,
+                       rqstp->rq_argp)) {
+               dprintk("nfsd: failed to decode arguments!\n");
+               *statp = rpc_garbage_args;
+               return 1;
+       }
+
        /* Check whether we have this call in the cache. */
-       switch (nfsd_cache_lookup(rqstp, proc->pc_cachetype)) {
+       switch (nfsd_cache_lookup(rqstp)) {
        case RC_INTR:
        case RC_DROPIT:
                return 0;
@@ -588,16 +595,6 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
                /* do it */
        }
 
-       /* Decode arguments */
-       xdr = proc->pc_decode;
-       if (xdr && !xdr(rqstp, (__be32*)rqstp->rq_arg.head[0].iov_base,
-                       rqstp->rq_argp)) {
-               dprintk("nfsd: failed to decode arguments!\n");
-               nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
-               *statp = rpc_garbage_args;
-               return 1;
-       }
-
        /* need to grab the location to store the status, as
         * nfsv4 does some encoding while processing 
         */
This page took 0.025879 seconds and 5 git commands to generate.