]> xenbits.xensource.com Git - people/aperard/linux.git/commitdiff
NFSD: Use only RQ_DROPME to signal the need to drop a reply
authorChuck Lever <chuck.lever@oracle.com>
Sat, 26 Nov 2022 20:55:30 +0000 (15:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Mar 2024 14:45:17 +0000 (14:45 +0000)
[ Upstream commit 9315564747cb6a570e99196b3a4880fb817635fd ]

Clean up: NFSv2 has the only two usages of rpc_drop_reply in the
NFSD code base. Since NFSv2 is going away at some point, replace
these in order to simplify the "drop this reply?" check in
nfsd_dispatch().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfsproc.c
fs/nfsd/nfssvc.c

index 52fc222c34f267baa04f1c64686e9d2305583df9..a5570cf75f3fd550a38b6b82fffdba4039fa9503 100644 (file)
@@ -211,7 +211,7 @@ nfsd_proc_read(struct svc_rqst *rqstp)
        if (resp->status == nfs_ok)
                resp->status = fh_getattr(&resp->fh, &resp->stat);
        else if (resp->status == nfserr_jukebox)
-               return rpc_drop_reply;
+               __set_bit(RQ_DROPME, &rqstp->rq_flags);
        return rpc_success;
 }
 
@@ -246,7 +246,7 @@ nfsd_proc_write(struct svc_rqst *rqstp)
        if (resp->status == nfs_ok)
                resp->status = fh_getattr(&resp->fh, &resp->stat);
        else if (resp->status == nfserr_jukebox)
-               return rpc_drop_reply;
+               __set_bit(RQ_DROPME, &rqstp->rq_flags);
        return rpc_success;
 }
 
index 6f4a38f5ab0cec58321acb479f0e4e5409fa6d46..0c75636054a540f25ce29afc09a9be52b453c44e 100644 (file)
@@ -1071,7 +1071,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
 
        nfs_reply = xdr_inline_decode(&rqstp->rq_res_stream, 0);
        *statp = proc->pc_func(rqstp);
-       if (*statp == rpc_drop_reply || test_bit(RQ_DROPME, &rqstp->rq_flags))
+       if (test_bit(RQ_DROPME, &rqstp->rq_flags))
                goto out_update_drop;
 
        if (!proc->pc_encode(rqstp, &rqstp->rq_res_stream))