diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-04 15:37:10 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-05 11:15:43 -0400 |
commit | 0d2a970d0ae55086520e1e58e572a7acd519429c (patch) | |
tree | b91159e4d38c5c9599cfb7500395729ced35a245 /include/linux/sunrpc/xprt.h | |
parent | 1dddda86c056ab4cf49e4206824a9de3e0c4159a (diff) | |
download | linux-0d2a970d0ae55086520e1e58e572a7acd519429c.tar.gz linux-0d2a970d0ae55086520e1e58e572a7acd519429c.tar.bz2 linux-0d2a970d0ae55086520e1e58e572a7acd519429c.zip |
SUNRPC: Fix a backchannel race
We need to allow the server to send a new request immediately after we've
replied to the previous one. Right now, there is a window between the
send and the release of the old request in rpc_put_task(), where the
server could send us a new backchannel RPC call, and we have no
request to service it.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include/linux/sunrpc/xprt.h')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 8b93ef53df3c..bc9c39d6d30d 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -212,7 +212,8 @@ struct rpc_xprt { #if defined(CONFIG_SUNRPC_BACKCHANNEL) struct svc_serv *bc_serv; /* The RPC service which will */ /* process the callback */ - unsigned int bc_alloc_count; /* Total number of preallocs */ + int bc_alloc_count; /* Total number of preallocs */ + atomic_t bc_free_slots; spinlock_t bc_pa_lock; /* Protects the preallocated * items */ struct list_head bc_pa_list; /* List of preallocated |