Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3322071pxf; Mon, 15 Mar 2021 07:07:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKEJVrNM/vcW6W9bH8scEIeBj7ees+dxYtn0+l+lny/aeQ96rYgFYbeJgVdKo5NsD6NoWf X-Received: by 2002:a05:6402:40d5:: with SMTP id z21mr30925991edb.20.1615817229168; Mon, 15 Mar 2021 07:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817229; cv=none; d=google.com; s=arc-20160816; b=cMcBrC49A6PhVr+b4PcBL2cqCkxKvhbs8HY1pk5UUTEy4NQdx3pWpy35mB+dox/81u JOxXzEz79qEQRTq5xuVkYifFAxLco76EP9zucjTBBagtBt0ijwogYBvi5biHQdAptBc9 W73j0hgw3OEQahPVCveOim0lmAy5Zn8J8ecBiDyGNuYKHSisX6AQDTh4wpWMktodjyS3 v7qVhoEw/4bYVGjR41fIaF4xKTu/utXyEJ3A2xqTLuZut9OkLxdIK6Uu8PY8Nzq2CCdy CqQPKG3R8ky7UNm4NF6iTXEvBiIrcc5uva8NVf5dqh8NC10+lobaFVDQRR3UTSuKennm tDTw== 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=XQTlspJKsV+UPD9id7Y6JDirc3h2YCf0RB4kBVALAEc=; b=dNrwQH3UR/IbPs4iB4V6A1yvJAcGYzBJ13EXOnSRaKvTbnbSkrigLB1moPnId2Pvld Z63oqszYg4r9qNttJ4oV/RxdEYfddGYyHoyHJGyD+HZOk+9WdFfkU6pZH/K77J+esTwX mhCQ9dRPhpSCTNM7NZDVCVUNN7Oyj8Y+lLVNIVZA27jWjOmVqdR6nE0dDwqs3XOAf775 olotBEHYJ79X9FeGAd32kRMNmr2lcYuv1OCWvEsWkZiur46pc+8BSvmzV5Q3UlY+jKuV RRh5AIX7lXF0DQe6mpwM5/hCWnvODT7v1L3Jlk4UevvhU8DY07f+537rKlo3I2iWA7VJ mEVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eg6GWKn2; 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 ec23si12001595ejb.710.2021.03.15.07.06.46; Mon, 15 Mar 2021 07:07:09 -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=Eg6GWKn2; 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 S234785AbhCOOF2 (ORCPT + 99 others); Mon, 15 Mar 2021 10:05:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:34534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231998AbhCON53 (ORCPT ); Mon, 15 Mar 2021 09:57:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0AB5B64EF9; Mon, 15 Mar 2021 13:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816649; bh=1avx2fmdYPQmOKmxt4i8FIMz9NoVJrIbxZW3s5w1V4U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eg6GWKn2hIncJddSRP26BWBKN9fwFhuhaABGczNSj5fRSUR3PUZBykZvuHlhode1N XiRm0kejqvGXjQ+K3loJ38eNTjOhnPv0yMVJL5t7lbzDTVkP57MSGqKuQjkO6ZGQZ5 dRemtOHk/wNGYbF8IG6vsOrqZtPBUD/KgYjTJmSc= 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.11 041/306] cifs: return proper error code in statfs(2) Date: Mon, 15 Mar 2021 14:51:44 +0100 Message-Id: <20210315135509.029598541@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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 @@ -290,7 +290,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)