Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965143AbbBQLps (ORCPT ); Tue, 17 Feb 2015 06:45:48 -0500 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:39910 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756965AbbBQLfO (ORCPT ); Tue, 17 Feb 2015 06:35:14 -0500 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Steve Dickson , Trond Myklebust , Jiri Slaby Subject: [PATCH 3.12 109/122] SUNRPC: Ensure call_connect_status() deals correctly with SOFTCONN tasks Date: Tue, 17 Feb 2015 12:34:56 +0100 Message-Id: <94feca620813d8e56911a839d3b60ac42a950b64.1424099974.git.jslaby@suse.cz> X-Mailer: git-send-email 2.2.2 In-Reply-To: <09e6fe32192a77f6e2e60cc0f4103e630c7ecf20.1424099973.git.jslaby@suse.cz> References: <09e6fe32192a77f6e2e60cc0f4103e630c7ecf20.1424099973.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1607 Lines: 47 From: Steve Dickson 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 1fa3e2eb9db07f30a605c66d1a2fdde4b24e74d5 upstream. Don't schedule an rpc_delay before checking to see if the task is a SOFTCONN because the tk_callback from the delay (__rpc_atrun) clears the task status before the rpc_exit_task can be run. Signed-off-by: Steve Dickson Fixes: 561ec1603171c (SUNRPC: call_connect_status should recheck...) Link: http://lkml.kernel.org/r/5329CF7C.7090308@RedHat.com Signed-off-by: Trond Myklebust Acked-by: NeilBrown Signed-off-by: Jiri Slaby --- net/sunrpc/clnt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 9aa12c57f6a7..285040c71f38 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1707,10 +1707,10 @@ call_connect_status(struct rpc_task *task) case -ECONNABORTED: case -ENETUNREACH: case -EHOSTUNREACH: - /* retry with existing socket, after a delay */ - rpc_delay(task, 3*HZ); if (RPC_IS_SOFTCONN(task)) break; + /* retry with existing socket, after a delay */ + rpc_delay(task, 3*HZ); case -EAGAIN: /* Check for timeouts before looping back to call_bind */ case -ETIMEDOUT: -- 2.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/