Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp29220pxu; Sat, 24 Oct 2020 14:41:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymxiLlkDVydnOsfUbRe9OvAedf83OQ1t8ZbBSRv/w3L7S/xS/M0mdU6hvwwgSKlyAJvm6e X-Received: by 2002:aa7:c351:: with SMTP id j17mr8641449edr.70.1603575686267; Sat, 24 Oct 2020 14:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603575686; cv=none; d=google.com; s=arc-20160816; b=nMpTJJbv3ihOfkKiKJWzw3YFrBbUKk7enazWbNUP3i5U/AbiMg3vkTrjyNMmLjZ1po XjFWK+Dfk5tO9F004rKpRs42P6mNf4QVIOtCRslvHyTqcOu/5ISO7cjrXWtksCSCPIot uH5innkMnVi/mE/ls02zJl3r0FNb138Fyo9TI8DOkIx21VtKVbgYORZY1OoksRXn1jgW PNTVqT+9+fuk+xeucIP2NkRr0ZEOgtW9nVFDjCVqU0ZD8XsVVTDaMEuozJrj1ppQ/cxf M1sqErGcUthkAkKL2P+67Y0b0Tpc0gjRdz9lEQjp/KvwrjCH3Ba0RpIhrjKDsqULadPV W8sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=e1lTqXLcN5w00NKyttGMzYu+FWxt1ovJrYWEOkDWP80=; b=sBKRgQR4B6xYmvgkcQU2cAZXd25GSGik81UjxnmRKcPjGVz6DUqFiKPG3BD9KmBv4j 4D4cbebW6+YzWM0ne9150mOlXk3oIlyBciSddpM7AxBWaVFpDkWkESHvAr1YVV9kbrB7 zZefn1vxm//Ad8EESCvCeW2lcF8uaZpF3mogrmNhbJ07QfT9Y6jhcwsXQ+FQBxPevVDK P77IYp6aobrODwJ+xONtu0hmdnElM8+ZV+dwmGwwvr9JZYoRY69WfRXXCXuGn/Slf7Be uS1sVLVGkVKK3D5KjWzzgJ7yLW9V5oIdPkAJPZZ38ZF/86s4zHFead38w8jtHgnsqk0X R8EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=uizQMAk8; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t7si3738984ejj.37.2020.10.24.14.40.51; Sat, 24 Oct 2020 14:41:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=uizQMAk8; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764955AbgJXVjH (ORCPT + 99 others); Sat, 24 Oct 2020 17:39:07 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:40534 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765137AbgJXVjE (ORCPT ); Sat, 24 Oct 2020 17:39:04 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09OLWhs4026528; Sat, 24 Oct 2020 21:38:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2020-01-29; bh=e1lTqXLcN5w00NKyttGMzYu+FWxt1ovJrYWEOkDWP80=; b=uizQMAk8XeEwFWBgtyaffLpnOgTwYbnO3BRolFl3O+qB6A78XCN0Uiwo0S8xKyV7clHh dqSGMeIuymxy9nn5no08154e6K1TmsbByurMoXJS/kUNUN28wxSqJrSPXK7ZD+QBV5bM HAAAPdhHuv7lQ3WRkp0Nx6YNIURlmfSMwZmyp+2wVmNGAEO47mBOWwrUolmqpQnOMOnM 22azSbARDQLUzc3GSGPUDu0/GAODjQWUHvX6bweLtze1ZYTDcgFdjN95cbJWbYcMYr9I xNF2/93fRDfqJ9BjKLH1aKUa2kq87sZX6rtTTKXbTkWWz8zf4eKgO6V8Vm9tCS0DnAeU 7g== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 34ccwmh3kx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 24 Oct 2020 21:38:56 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09OLVATd101963; Sat, 24 Oct 2020 21:36:56 GMT Received: from pps.reinject (localhost [127.0.0.1]) by userp3030.oracle.com with ESMTP id 34c9cr9gkq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 24 Oct 2020 21:36:56 +0000 Received: from userp3030.oracle.com (userp3030.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 09OLau1K107516; Sat, 24 Oct 2020 21:36:56 GMT Received: from cdmvmol7.uk.oracle.com (dhcp-10-175-182-191.vpn.oracle.com [10.175.182.191]) by userp3030.oracle.com with ESMTP id 34c9cr9gka-1; Sat, 24 Oct 2020 21:36:55 +0000 From: Calum Mackay To: trondmy@hammerspace.com, anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH] SUNRPC: correct error code comment in xs_tcp_setup_socket() Date: Sat, 24 Oct 2020 22:36:38 +0100 Message-Id: <20201024213638.16697-1-calum.mackay@oracle.com> X-Mailer: git-send-email 2.18.4 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9784 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 adultscore=0 spamscore=0 mlxlogscore=999 clxscore=1011 malwarescore=0 priorityscore=1501 impostorscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010240165 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This comment was introduced by commit 6ea44adce915 ("SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()"). I believe EIO was a typo at the time: it should have been EAGAIN. Subsequently, commit 0445f92c5d53 ("SUNRPC: Fix disconnection races") changed that to ENOTCONN. Rather than trying to keep the comment here in sync with the code in xprt_force_disconnect(), make the point in a non-specific way. Fixes: 6ea44adce915 ("SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()") Signed-off-by: Calum Mackay --- net/sunrpc/xprtsock.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 554e1bb4c1c7..3f11de5ad486 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2278,10 +2278,8 @@ static void xs_tcp_setup_socket(struct work_struct *work) case -EHOSTUNREACH: case -EADDRINUSE: case -ENOBUFS: - /* - * xs_tcp_force_close() wakes tasks with -EIO. - * We need to wake them first to ensure the - * correct error code. + /* xs_tcp_force_close() wakes tasks with a fixed error code. + * We need to wake them first to ensure the correct error code. */ xprt_wake_pending_tasks(xprt, status); xs_tcp_force_close(xprt); -- 2.18.4