]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lockd: Remove some snippets of unfinished code
authorChuck Lever <chuck.lever@oracle.com>
Thu, 17 Oct 2024 13:36:29 +0000 (09:36 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 19 Nov 2024 01:23:04 +0000 (20:23 -0500)
Clean up.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/svc4proc.c
fs/lockd/svcproc.c

index 8a72c418cdcc09b5172532964c0cbe8bc7eeda3a..1d0400d94b3df0be7774d8b659849011afa204db 100644 (file)
@@ -142,18 +142,6 @@ __nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_res *resp)
        if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
                return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
 
-#if 0
-       /* If supplied state doesn't match current state, we assume it's
-        * an old request that time-warped somehow. Any error return would
-        * do in this case because it's irrelevant anyway.
-        *
-        * NB: We don't retrieve the remote host's state yet.
-        */
-       if (host->h_nsmstate && host->h_nsmstate != argp->state) {
-               resp->status = nlm_lck_denied_nolocks;
-       } else
-#endif
-
        /* Now try to lock the file */
        resp->status = nlmsvc_lock(rqstp, file, host, &argp->lock,
                                        argp->block, &argp->cookie,
index a03220e66ce02fe9a7b2a5fcfb56293df97e6f24..d959a5dbe0ae8893da5fe4cd2992cb570eccf7bc 100644 (file)
@@ -165,18 +165,6 @@ __nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_res *resp)
        if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
                return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
 
-#if 0
-       /* If supplied state doesn't match current state, we assume it's
-        * an old request that time-warped somehow. Any error return would
-        * do in this case because it's irrelevant anyway.
-        *
-        * NB: We don't retrieve the remote host's state yet.
-        */
-       if (host->h_nsmstate && host->h_nsmstate != argp->state) {
-               resp->status = nlm_lck_denied_nolocks;
-       } else
-#endif
-
        /* Now try to lock the file */
        resp->status = cast_status(nlmsvc_lock(rqstp, file, host, &argp->lock,
                                               argp->block, &argp->cookie,