[Devel] [PATCH RHEL7 COMMIT] sunrpc: use rpc_killall_tasks helper when "kill_tasks" toggle is raised

Konstantin Khorenko khorenko at virtuozzo.com
Tue Jul 11 18:34:00 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.33.3
------>
commit 9eb11cddce25454e85610eca5343d70758697ad9
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date:   Tue Jul 11 19:34:00 2017 +0400

    sunrpc: use rpc_killall_tasks helper when "kill_tasks" toggle is raised
    
    This helper is much better.
    First, is's in upsteam (I wrote it, but forgot :( ).
    Second, it kills *all* tasks (including sleeping in other than "pending"
    queues).
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 net/sunrpc/clnt.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 94b0187..4a2fe46 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -2543,11 +2543,8 @@ static void rpc_kill_tasks(struct net *net)
 	struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
 
 	spin_lock(&sn->rpc_client_lock);
-	list_for_each_entry(clnt, &sn->all_clients, cl_clients) {
-		spin_lock(&clnt->cl_lock);
-		xprt_wake_pending_tasks(clnt->cl_xprt, -EIO);
-		spin_unlock(&clnt->cl_lock);
-	}
+	list_for_each_entry(clnt, &sn->all_clients, cl_clients)
+		rpc_killall_tasks(clnt);
 	spin_unlock(&sn->rpc_client_lock);
 }
 


More information about the Devel mailing list