]> xenbits.xensource.com Git - people/aperard/linux.git/commitdiff
NFSD: Use set_bit(RQ_DROPME)
authorChuck Lever <chuck.lever@oracle.com>
Sat, 7 Jan 2023 15:15:35 +0000 (10:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Mar 2024 14:45:17 +0000 (14:45 +0000)
[ Upstream commit 5304930dbae82d259bcf7e5611db7c81e7a42eff ]

The premise that "Once an svc thread is scheduled and executing an
RPC, no other processes will touch svc_rqst::rq_flags" is false.
svc_xprt_enqueue() examines the RQ_BUSY flag in scheduled nfsd
threads when determining which thread to wake up next.

Fixes: 9315564747cb ("NFSD: Use only RQ_DROPME to signal the need to drop a reply")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfsproc.c

index a5570cf75f3fd550a38b6b82fffdba4039fa9503..9744443c396522af6bf9ae34eca57c60a133cc8f 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)
-               __set_bit(RQ_DROPME, &rqstp->rq_flags);
+               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)
-               __set_bit(RQ_DROPME, &rqstp->rq_flags);
+               set_bit(RQ_DROPME, &rqstp->rq_flags);
        return rpc_success;
 }