Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3321789pxf; Mon, 15 Mar 2021 07:06:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq0p+fwdwypn/43sMxzEEVR4Iump3faN/1KjKPDqEw6JAxgJemhIqb0zEZZqZmWevzvsFM X-Received: by 2002:a17:907:10ce:: with SMTP id rv14mr24179548ejb.56.1615817212963; Mon, 15 Mar 2021 07:06:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817212; cv=none; d=google.com; s=arc-20160816; b=ya6+qGGhROPRJITnM6MY2rniizqB7sUfexpIgNmT6fG4SK21t+0B07hR/2z4lOwcsu szDDHT3YHAHnNXqYyQNyNkmmK2gEyLAUNb3G7KMKdXAo7s5LLVQCPPefAW3MmBVrenSH 4NZsyjLRVXo48BF4t2Hz450e4V5mcIR2P0QI+iav0ESlJqxSti5STAr2dCG4KvePGMVP TK2Su4sfK6iCWS+bOxuXyNEJxWUhLhMBP71Avl39gkbtdVOFuCiLxN1xWlk2x87MoExn TzmF/eGkBw6x3zcP3pYvBlijzu2GnrcZ9/xUJWZhmjU+WJ1NhC3PEYreMGEhEupwbv/i H9lA== 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=iBFIDeJMRbvgBpW9OCQykTY6sB6ITteYdOryV7o/pu0=; b=MLHO5vRmTQ8jFVJM4RovbMu537ywhw8db0JSn1rtfUTELdaGGg7/rDqRFhjJTDMpmL IfN86ScqSHS6dJGYhbe/KwwpyXL08ke8Xx46n1dpETxYdRcKf+p4sz/GF9/+bWfmlcrG I0Sr/Jas+0JPWNU3nvL529NFC7fMabO1t6oDX2zZmZIMVZMdOZVCxfe1H1c+nXLeH2tB tPOQxQe5XCy09DSx7xN7MyOCGeGaNXUUA8+fKz48j8GHMfi4oD1001CXrQTOSGBid8KX dEXOUS7t62ilQhg7hvPM6Say6N0Ps4oLk116gG0Fj2vYD4JKPLhol+ibckBM+e7gGXU9 HJqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vMKgDOFc; 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 n4si11208924ejz.464.2021.03.15.07.06.29; Mon, 15 Mar 2021 07:06:52 -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=vMKgDOFc; 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 S232965AbhCOOFE (ORCPT + 99 others); Mon, 15 Mar 2021 10:05:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:35016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231989AbhCON52 (ORCPT ); Mon, 15 Mar 2021 09:57:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A4CA564EF3; 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=1615816648; bh=/Rn4lCoUjxkfJPoLfVer3gjpO/SgvvRdtwvG9ii2AcM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vMKgDOFcnRqO5zIxSiKfS3iqiuFZ+DsxowLuPy0Ja99HNICcohG/of/QVDdT7qXl1 CqJxmTLQzFJ3i181sbGIbnXNCR3v0W6vyeWhRU/ZsrVauvuYcGj79rVPu6XegDPOf6 ZjsiegI2iCZ/hwdHAR9tn4bT9pJzPo7siALrYG0Q= 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.4 024/168] cifs: return proper error code in statfs(2) Date: Mon, 15 Mar 2021 14:54:16 +0100 Message-Id: <20210315135551.146114421@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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 @@ -278,7 +278,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)