]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
SUNRPC: xprt_complete_bc_request must also decrement the free slot count
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 26 Aug 2015 20:17:53 +0000 (14:17 -0600)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 31 Aug 2015 20:46:01 +0000 (14:46 -0600)
[ Upstream commit 1980bd4d829a87ccd21b949f8a11ff1b426f5b0b ]

Calling xprt_complete_bc_request() effectively causes the slot to be allocated,
so it needs to decrement the backchannel free slot count as well.

Fixes: 0d2a970d0ae5 ("SUNRPC: Fix a backchannel race")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/backchannel_rqst.c

index c111a2d9bc1f9cfe6ca25c89d7a9354c944118f6..41c88c61a2cdb5f96cf7c28f6570a95b54116727 100644 (file)
@@ -336,7 +336,7 @@ void xprt_complete_bc_request(struct rpc_rqst *req, uint32_t copied)
 
        spin_lock(&xprt->bc_pa_lock);
        list_del(&req->rq_bc_pa_list);
-       xprt->bc_alloc_count--;
+       xprt_dec_alloc_count(xprt, 1);
        spin_unlock(&xprt->bc_pa_lock);
 
        req->rq_private_buf.len = copied;