Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3324433pxf; Mon, 15 Mar 2021 07:09:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZkcvqDFTQExcRVQRVF6ePP2xu8VIzr2WGKkswrWaCXfIdl6nyTCCvg+6XDjhUHlyoz4ov X-Received: by 2002:a17:906:35cf:: with SMTP id p15mr23683845ejb.379.1615817380023; Mon, 15 Mar 2021 07:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817380; cv=none; d=google.com; s=arc-20160816; b=WZIgNX1tjAdUtebxHxZ+3/dhIJiIciTbUDF0v3R+nyI/SgvXG2SXoGUxBsb+3HG0tv TARgRNa5mmXUbNqnkM2kWibrnqnehsRxcvwFHfgle/i3Q8v0ipmidnAKWH0yzQ/i8X2n V5hrFWvDAxa2ttvZQgrpUB6+PuvE1sYZFrfbSQywrU5ESXlJszw9xpaj7HmmAlrnqosE yqLXBuHVs6irR79i8tQ9fqa4lVbwCmTxu0H0UHqL3XgwKEJh3s/Xt1uohjnjxVc34Wco LP9WbEJ9K5m2OceLQqm3mKAWVFnucuvuQb+16p97HwLdyLoi2RaALaO96tYEWsPDMxUp 08ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=F11+HvMde4n+tw3Wsn9q8XXHYUMjpmd9ov7Bhja+lgg=; b=lnEIEbFl64q7EK8/opVdEpmg63WOeodkPWAxwa3oxsCkCECTO9kNJ+wawo495ZROXh p1kypDX5B9ektlbJsnT/YXYgWwwUVIee7KLanSJvAWepGxtuYauH0OGTx1nF+jPpYqzR 5PWaA2xePl8zZtAUzpS5PBxwdzB1ypBKSB+DOd0IU/6RYszMOYMpTJka9j+OG4xSbw7l uEy3yw/fU3Ia2xkjQwfen+nYxSyjkEqRncs0BzpUyu3gJb9LWu4+duvJb5VqAYARRyzc M2nls5CpV8HMo7DANT5mwqHoNmsUC8Yoxom/cRwJKeaQCs5iWRhlPdWf3XsHGf9H2FLN gJoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ZQk/zFK+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si10677892ejj.523.2021.03.15.07.09.15; Mon, 15 Mar 2021 07:09:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b="ZQk/zFK+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234796AbhCOOFd (ORCPT + 99 others); Mon, 15 Mar 2021 10:05:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:34914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231986AbhCON52 (ORCPT ); Mon, 15 Mar 2021 09:57:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 877D564EF0; Mon, 15 Mar 2021 13:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816647; bh=83Xs0tMceLlpSnIvlu0A0942S6gOOumlqNnRQalz+6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZQk/zFK+a0SQWTZk3Fr/Dk1ixzV7QyPSH/hPUh8JCaCbjJU8ZCyGwaMHjJ/0KurX4 YeV9p14ESUgslCDaRa9lu3NGqdPVyMrBnfU+yoSuJnSdO5ipveImBsLZ6eyFvm78fK 2BbxMIHj2gLFazhKWSPLER5PJtr9Ae7naqyl77RM= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Paulo Alcantara (SUSE)" , Aurelien Aptel , Ronnie Sahlberg , Steve French Subject: [PATCH 5.10 032/290] cifs: return proper error code in statfs(2) Date: Mon, 15 Mar 2021 14:52:05 +0100 Message-Id: <20210315135543.007898513@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Paulo Alcantara commit 14302ee3301b3a77b331cc14efb95bf7184c73cc upstream. In cifs_statfs(), if server->ops->queryfs is not NULL, then we should use its return value rather than always returning 0. Instead, use rc variable as it is properly set to 0 in case there is no server->ops->queryfs. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Reviewed-by: Ronnie Sahlberg CC: Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/cifsfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -286,7 +286,7 @@ cifs_statfs(struct dentry *dentry, struc rc = server->ops->queryfs(xid, tcon, cifs_sb, buf); free_xid(xid); - return 0; + return rc; } static long cifs_fallocate(struct file *file, int mode, loff_t off, loff_t len)