]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/lockd/svcproc.c
lockd: move grace period checks to common code
[linux-2.6-omap-h63xx.git] / fs / lockd / svcproc.c
index 1b013e19880489c9f534823740c5411d2efa03af..a587b81338b12069b9b4bc27781eb2566b99d7d4 100644 (file)
@@ -117,12 +117,6 @@ nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
        dprintk("lockd: TEST          called\n");
        resp->cookie = argp->cookie;
 
-       /* Don't accept test requests during grace period */
-       if (locks_in_grace()) {
-               resp->status = nlm_lck_denied_grace_period;
-               return rc;
-       }
-
        /* Obtain client and file */
        if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
                return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
@@ -152,12 +146,6 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
 
        resp->cookie = argp->cookie;
 
-       /* Don't accept new lock requests during grace period */
-       if (locks_in_grace() && !argp->reclaim) {
-               resp->status = nlm_lck_denied_grace_period;
-               return rc;
-       }
-
        /* Obtain client and file */
        if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
                return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
@@ -176,7 +164,8 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
 
        /* Now try to lock the file */
        resp->status = cast_status(nlmsvc_lock(rqstp, file, host, &argp->lock,
-                                              argp->block, &argp->cookie));
+                                              argp->block, &argp->cookie,
+                                              argp->reclaim));
        if (resp->status == nlm_drop_reply)
                rc = rpc_drop_reply;
        else