Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp732678imm; Thu, 13 Sep 2018 07:00:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdboogbCVebCKHCePdECz1MQee31D4BR8CUF7/s0bt61Bfo8XpccJeGV3O5+n+hBkA+t1dkN X-Received: by 2002:a17:902:b688:: with SMTP id c8-v6mr7556520pls.114.1536847208084; Thu, 13 Sep 2018 07:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847208; cv=none; d=google.com; s=arc-20160816; b=Yt1T7iWWna0iAH9NN31jTgIStdSWSLLvBREBx1BGyDOnpqWlS81my4OOeBZRL0bd+t xcQ+2hfAFfIT9iqlWjcD0uxlEJOPiNJFiJGnJbe3JxFSLkPYutMa44LLXLJdRp4+yeOO 62BeqDj3d1c4Vf4favLRObaqmK/BEDANT0iD3nMbq0rR0mzH7LTBiKAkFePcrbHy9fsc 2wS3BOCZKVB67hYWgDeF0rEAWhCOCDl2TOftz22Mh8w+/RuVYVnJhKKuyJOprEL4eFVD 352opeJJY1me2yyde3aZ7AYii0E4n/Sc3y6mC1JowIQT4+lfC8njmYnE65WkkG9TGLaw DAPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=1wgyre3oirBLzgr7x9zSdmaNc3qolbye6dDV7tKvDdY=; b=CCviP5xsoPWcIC784Bec6n8NlXYxIlZy0tqiKxRMh3UcUZWsYPyT8HHI5zwvAcqCZX dZOaOYOcEn7KZV8DQXDwpn2hKlPRJCCDGFe3rcNhRQ2XLEZUmLSP6qRcI5E5rFtCKA0t B52tyhnwmtQDD9GvrXmV3byQQlmL5MTqsyucTOqE0xCEDlqqHbmzkOMOZnbSt8wKLOi5 2Xmleuy91floIq37Mq9SS0zOqQAUe2KHtbBUTcsj9JKg8ta1DxWP4Hd01bDN+hVZ80SO WLSaJWBtygRPzIJ/obMNUHYbcYcFBNKrG3OFDWixOPwbKgK77VBcLEs2J2MTNDIIFKMt 3Qug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3-v6si4306816pgh.359.2018.09.13.06.59.53; Thu, 13 Sep 2018 07:00:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731395AbeIMTII (ORCPT + 99 others); Thu, 13 Sep 2018 15:08:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34588 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728566AbeIMTIH (ORCPT ); Thu, 13 Sep 2018 15:08:07 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2657ED15; Thu, 13 Sep 2018 13:58:29 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , Anna Schumaker , Sasha Levin Subject: [PATCH 4.18 108/197] NFSv4: Fix error handling in nfs4_sp4_select_mode() Date: Thu, 13 Sep 2018 15:30:57 +0200 Message-Id: <20180913131845.870544708@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wei Yongjun [ Upstream commit 72bf75cfc00c02aa66ef6133048f37aa5d88825c ] Error code is set in the error handling cases but never used. Fix it. Fixes: 937e3133cd0b ("NFSv4.1: Ensure we clear the SP4_MACH_CRED flags in nfs4_sp4_select_mode()") Signed-off-by: Wei Yongjun Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -7734,7 +7734,7 @@ static int nfs4_sp4_select_mode(struct n } out: clp->cl_sp4_flags = flags; - return 0; + return ret; } struct nfs41_exchange_id_data {