Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3514798pxf; Mon, 15 Mar 2021 11:14:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWzp2mlmAegbVee2kxeQTJNVWxIwa84A+7LvAzd9zRqgzrM21QfbNa+cVW8aFXoVqVAT+s X-Received: by 2002:a17:906:5450:: with SMTP id d16mr14634756ejp.274.1615832070592; Mon, 15 Mar 2021 11:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832070; cv=none; d=google.com; s=arc-20160816; b=MRTSX00xWxGfGknXm+IdPOThHB+Q5OqtwHk90S5804eCB/3/Mqg4qsYBROKponW9qH yN+ct21IycpenmpP+bDckASC51+lZaN668rIp/cVls3oV2BnSPBH3BhjdonmdBH2iWqd ba9JZ8d7MzbDHUrTL3P5tdEcqegXoGgrZWZWo2R0+ygG4Uvye89WZXEvTbzkP4yPhJb6 ViNPAonPGfzzEmMKTRfaKToOTWr+AncgbZmqPsYKJC+XEju4UftNXhIOVLQqCKFwK7FW CwJalpepRz9Z1fJXImDs2HAg/A0Zno/ZO3olhvSjY+7s0fWcf6NoHvsvb9GLznr3Pw4o 26KA== 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=Erp1OHJC3nMsK/t9UL8qbuljGU61IOTcI9/S3rcJ1cI=; b=x8LMgrOFC6+NHFAoUvWgjbVxaofiIOXtHOxdNIGfsSLbFQGTsbNbnH6iYJglzFfzGn tyWLDd+XPfPFlgJLxdr684lbSDv2brb/2ck/H+34ykUN22k+DW3R9FmJnmc9bCrXk0ox b3ejI6hDNRcxWBPV8lIo1ZTPGVeSLoaoRpaXh5pkjlKuXnjkduK0A+XYA0WUI6eaIbrF Ro/oPjyI2DrcUzN+v3rJrV+bMBEFaocRvt7fSOa6OVwAmeo6zLzNKa5OEwy2N12ep/QC cMosW2TmTEr4swC7tiHaHVLhy0R/6/G3bresjryK67UjMk4knE8m4kT210KD7l8VYvzx IkLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="y2jRCv/f"; 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 z24si11255253ejx.462.2021.03.15.11.14.07; Mon, 15 Mar 2021 11:14:30 -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="y2jRCv/f"; 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 S236100AbhCOOMV (ORCPT + 99 others); Mon, 15 Mar 2021 10:12:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:36788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231829AbhCON6c (ORCPT ); Mon, 15 Mar 2021 09:58:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C28E664EF0; Mon, 15 Mar 2021 13:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816699; bh=eJsdkowwYLL6j/ragKxfU9ATzJo5TwYd2qfCfxOueJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y2jRCv/f7K0vASFY166ruQqqubkFkTSmOuRfHU633ksqEEoMP7tvbiM8KrUMfzk8G xxlE5j8WqXFkhvMemO3ced2utTrpdBI4fcVeNXpVzv4lfjHKaMcZUVwB4G1fDWetEq bLABu4udCtR7vi7CUJNyE5I5q421J7u2SUgfZxhk= 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 4.19 014/120] cifs: return proper error code in statfs(2) Date: Mon, 15 Mar 2021 14:56:05 +0100 Message-Id: <20210315135720.484556544@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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 @@ -229,7 +229,7 @@ cifs_statfs(struct dentry *dentry, struc rc = server->ops->queryfs(xid, tcon, buf); free_xid(xid); - return 0; + return rc; } static long cifs_fallocate(struct file *file, int mode, loff_t off, loff_t len)