From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7C17C43219 for ; Thu, 2 May 2019 15:43:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0716204EC for ; Thu, 2 May 2019 15:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556811826; bh=5bPuPdaKczs4UqEYiFRfvaXCm3/b733eld0mt8DMLF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=S9/WgNt7OpLbW6P7TfcRz0/+GR/IqYEODv4AcagV/+RfbXLq+mUY9QlurUA4ft0op 1xWGfBAtaKKFoMaG0ZJ1ToUraA8MyDVwyqqtlvXHjha/6rll5CKR+2WqJxn9nZX6xN p5ZIVVxPVWFFQnkCklm5VpJdfrgfNcJLnE8AVQ08= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726819AbfEBPnk (ORCPT ); Thu, 2 May 2019 11:43:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:44012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727167AbfEBP1O (ORCPT ); Thu, 2 May 2019 11:27:14 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 176702081C; Thu, 2 May 2019 15:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556810833; bh=5bPuPdaKczs4UqEYiFRfvaXCm3/b733eld0mt8DMLF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yohsB8nwxLwZlE/Kq3Xo05vLcvekzEn094AWfTtZQdy/GB84slZovWOVb/xjUN/xH 8yFKnX3ft0CJdtxsu4zuU7hLsTT57Uxw5dSnfAaYbzkZlBVyAI8H8zYVEwHC4GcOtO qXyjb6DYM64mRG4VxsgRCiDq15x2len8KhuX5Zsc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , "Sasha Levin (Microsoft)" Subject: [PATCH 4.19 45/72] NFS: Fix a typo in nfs_init_timeout_values() Date: Thu, 2 May 2019 17:21:07 +0200 Message-Id: <20190502143337.048238268@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190502143333.437607839@linuxfoundation.org> References: <20190502143333.437607839@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ Upstream commit 5a698243930c441afccec04e4d5dc8febfd2b775 ] Specifying a retrans=0 mount parameter to a NFS/TCP mount, is inadvertently causing the NFS client to rewrite any specified timeout parameter to the default of 60 seconds. Fixes: a956beda19a6 ("NFS: Allow the mount option retrans=0") Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin (Microsoft) --- fs/nfs/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 96d5f8135eb9..751ca65da8a3 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -459,7 +459,7 @@ void nfs_init_timeout_values(struct rpc_timeout *to, int proto, case XPRT_TRANSPORT_RDMA: if (retrans == NFS_UNSPEC_RETRANS) to->to_retries = NFS_DEF_TCP_RETRANS; - if (timeo == NFS_UNSPEC_TIMEO || to->to_retries == 0) + if (timeo == NFS_UNSPEC_TIMEO || to->to_initval == 0) to->to_initval = NFS_DEF_TCP_TIMEO * HZ / 10; if (to->to_initval > NFS_MAX_TCP_TIMEOUT) to->to_initval = NFS_MAX_TCP_TIMEOUT; -- 2.19.1