[Devel,RHEL7,COMMIT] ve/sunrpc: fix ve is dying check on -ENETUNREACH error upon connect

Submitted by Konstantin Khorenko on March 24, 2017, 1:17 p.m.


Message ID 201703241317.v2ODH2t0026587@finist_cl7.x64_64.work.ct
State New
Series "sunrpc: fix ve is dying check on -ENETUNREACH error upon connect"
Headers show

Commit Message

Konstantin Khorenko March 24, 2017, 1:17 p.m.
The commit is pushed to "branch-rh7-3.10.0-514.10.2.vz7.29.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.10.2.vz7.29.6
commit 3e48f57a452b597b23039c3278e67788ac48f8d4
Author: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Date:   Fri Mar 24 17:17:02 2017 +0400

    ve/sunrpc: fix ve is dying check on -ENETUNREACH error upon connect
    This operations can be asynchonious. So, current VE is not the right one.
    VE from transport network has to be taken instead.
    Fixes commit 4ad21d242066afcb4f55000c308322c3bad98a2b
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
    Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
 net/sunrpc/xprt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 58fb139..1dd1598 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -778,7 +778,9 @@  static void xprt_connect_status(struct rpc_task *task)
 	switch (task->tk_status) {
-		if (current->task_ve->ve_netns == NULL) {
+		dprintk("RPC: ve_name(xprt->xprt_net->owner_ve): %s\n",
+				ve_name(xprt->xprt_net->owner_ve));
+		if (xprt->xprt_net->owner_ve->ve_netns == NULL) {
 			dprintk("RPC: %5u xprt_connect_status: error %d connecting to "
 					"server %s\n", task->tk_pid, -task->tk_status,