projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fdcf13
)
SUNRPC: Ensure we always bump the backlog queue in xprt_free_slot
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Thu, 1 Dec 2011 19:16:17 +0000
(14:16 -0500)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Thu, 1 Dec 2011 19:16:17 +0000
(14:16 -0500)
Whenever we free a slot, we know that the resulting xprt->num_reqs will
be less than xprt->max_reqs, so we know that we can release at least one
backlogged rpc_task.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org [>=3.1]
net/sunrpc/xprt.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/xprt.c
b/net/sunrpc/xprt.c
index f4385e45a5fcb398086c6c8c5c8ab4daff7ee139..c64c0ef519b594320ff688f3881579d2926be21d 100644
(file)
--- a/
net/sunrpc/xprt.c
+++ b/
net/sunrpc/xprt.c
@@
-995,13
+995,11
@@
out_init_req:
static void xprt_free_slot(struct rpc_xprt *xprt, struct rpc_rqst *req)
{
- if (xprt_dynamic_free_slot(xprt, req))
- return;
-
- memset(req, 0, sizeof(*req)); /* mark unused */
-
spin_lock(&xprt->reserve_lock);
- list_add(&req->rq_list, &xprt->free);
+ if (!xprt_dynamic_free_slot(xprt, req)) {
+ memset(req, 0, sizeof(*req)); /* mark unused */
+ list_add(&req->rq_list, &xprt->free);
+ }
rpc_wake_up_next(&xprt->backlog);
spin_unlock(&xprt->reserve_lock);
}