Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp862764ybl; Fri, 24 Jan 2020 10:55:18 -0800 (PST) X-Google-Smtp-Source: APXvYqzjHPifwO9ZW8MOtt1FU7a3tJ/TBe1J74rWZmw/fa2svoICaEtdViKgaJSqMuOs9fgr6JK2 X-Received: by 2002:aca:dc45:: with SMTP id t66mr167281oig.39.1579892118380; Fri, 24 Jan 2020 10:55:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579892118; cv=none; d=google.com; s=arc-20160816; b=DW1aNihnhax+aGNHdC5GuwkIk3mSTr/TpCYx2axnwU1vRzq1l2kbngMDakApsTempM cO5hrXGKhzdKDGt90I+ym1MUClArcdi4ZrpT31/Id/RZFlL9ADV/N+NBSmIT5nVgveqA 0Sgzw75KrCe4hsNr8PmCzx8ChyXGQ0UAGJy4modOq71FgOnXfunLtkrepitWLcmTLCGP T0ykxvmaDE75SLfj9aOdxEOOJr69erXyY+qK+Vwd8G4liyyAd/6/VlXTTHIt6BOs16x9 oW3FN7/VGRa5ojc5I7h4oeWn+n0e5qedgtMdQ8IL0lbvV+tRHb/nOPqwVKTtdBG9tREx 9ApA== 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:dkim-signature; bh=goebipqywyaywh76T75iIposdyQ20+J8BI4phdT3d74=; b=cQNz6YwXUF0BB+5u8b6xLr0ZOlgXr71BI5UpY6rw4LhmBFcBO8xoIrOTWC4McI0EHw rH2v9UrtjSRbtYlwU4odBgNb7l7OZjbuWm5weTpznEssDs0mn6QArJ9Fs2A6m6G5y8BK KKfdazK93rEAwOfZI7mRCPclBu9xP1j4A4lFtInBWWR9TPGZCpYhQl9j/VOqv5W3IVAI d+9gXkeayBG6NNhFIsR8X9mPdGBPw20IcMHkmnc7SI42UohbH3r9/ju4fJRyg7ImK/kz EyuMJQ6G59BX8xtUYpJduWxujxejLaC02igiQu9s99Uq7ppDGQSOj30rx2RtKJ+iwX7a uufA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QckKBe3Y; 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 d1si3125781oth.158.2020.01.24.10.55.06; Fri, 24 Jan 2020 10:55:18 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=QckKBe3Y; 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 S2391716AbgAXL2p (ORCPT + 99 others); Fri, 24 Jan 2020 06:28:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:44974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391703AbgAXL2l (ORCPT ); Fri, 24 Jan 2020 06:28:41 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 091C6206D4; Fri, 24 Jan 2020 11:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579865320; bh=zmOC4M/Wl5ibF14B6bnHfbXoKU5KEmJxJ6MwADDoRQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QckKBe3YBoLfYLEezR8QwPNnAnK1+arV68j8B48NZY8JrDixclQOvwbhZ25GXvHoe uSQp4YUs8Fl4p2stUM0yh743sCW3Tc/3iOeiGWkTneH/uFy1AmoEtVfv85gF66fzS4 1q+JXvIYztL94WP0ifkB60U1mLfcz1i8O2KVdRAs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Theodore Tso , Sasha Levin Subject: [PATCH 4.19 501/639] ext4: set error return correctly when ext4_htree_store_dirent fails Date: Fri, 24 Jan 2020 10:31:11 +0100 Message-Id: <20200124093151.547582834@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Colin Ian King [ Upstream commit 7a14826ede1d714f0bb56de8167c0e519041eeda ] Currently when the call to ext4_htree_store_dirent fails the error return variable 'ret' is is not being set to the error code and variable count is instead, hence the error code is not being returned. Fix this by assigning ret to the error return code. Addresses-Coverity: ("Unused value") Fixes: 8af0f0822797 ("ext4: fix readdir error in the case of inline_data+dir_index") Signed-off-by: Colin Ian King Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- fs/ext4/inline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 56f6e1782d5f7..4572cb0579518 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -1419,7 +1419,7 @@ int htree_inlinedir_to_tree(struct file *dir_file, err = ext4_htree_store_dirent(dir_file, hinfo->hash, hinfo->minor_hash, de, &tmp_str); if (err) { - count = err; + ret = err; goto out; } count++; -- 2.20.1