Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp464784ybl; Tue, 28 Jan 2020 06:23:19 -0800 (PST) X-Google-Smtp-Source: APXvYqxtFhuYeZMcrsOKcuIDJhkyQV2uCad6dwY+MjyvJXwlditZllxJLTRoQxKCV/xfpMfJNbMf X-Received: by 2002:aca:b4c3:: with SMTP id d186mr2833813oif.131.1580221399190; Tue, 28 Jan 2020 06:23:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580221399; cv=none; d=google.com; s=arc-20160816; b=iMzjC4MJj42q8FzcXL+eqHIL4I8Fhki+0bFLxYSgrdiZleoS2MzaYM/68ld1DB2srJ DJVS4WOAFKwPqJ7oD/wxvkEHlXd1HhNx60r3DxertoVkQjtXhuK6R0jkCNgUa9ImzFz8 PIShDAzh6rl+/lpPKEk7rmcOK4ZEWJzi4lzeJLEGRApIc0A3s/wIUIGzVQkRUVBnjvQ4 F+2cmZsZ+VojE+Jf4ISaGvnnm+cYEXIDo/aSvuOnlYE0PqTwpbiPqInxlQubdysnR9to LgOXOk683nP6pDE+Xi5+AsfBVY/s+a0gDLMtOu5RFOCFInjwr3PdwEA/XOxTzQLH6byF ioAA== 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=IxyOy6rt2bowiVlSHStsLfFJiYu2/8QDzS5Yc28/nWs=; b=zD6LbDqm71tjq6VCyk3GrZ3lv4v4cu1mr8o3T70a8DbRyWzqYrLQPUocViS0SG8VI6 aXLlMICXVWUBRp7WNZZQBrXH3tXK0D8P+HF/D6Et9VhwXqZE9O0Br9G7orsbre4YObqU 6fNunn7aB9anVLaFMPf3cRm2rOijifbZRR/oXjUyz3x6DKeydMxEG15g2wcT2GXerQ0n Y1b2xakZyQmnFA9GPcwqS8ajwgDzJ6Tje17JAmCIxszPZCNFXOzQ7QlCHGljNCPdJNcx pg8pt2uxVLgGjBCinLaEGXlXJ8IRtZxZEgLEpPXswwAXGyT0rG8BiZjQe1oGJQjnJHxA kvzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mZ7nq1+V; 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 v23si8467086otk.321.2020.01.28.06.23.07; Tue, 28 Jan 2020 06:23:19 -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=mZ7nq1+V; 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 S1731511AbgA1OWK (ORCPT + 99 others); Tue, 28 Jan 2020 09:22:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:47820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730349AbgA1OWI (ORCPT ); Tue, 28 Jan 2020 09:22:08 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 DAAC824693; Tue, 28 Jan 2020 14:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221328; bh=CXO6h2xAGZyx4FtgKjFFYu1WcNncHM/wuNBucRm0MOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mZ7nq1+VLknF0YxZRiPy4ICbqbPPHP5uqZ854YRCSIzudeA3FmkE8Yv5ZUaAfiz2V 5E4pPXTRDz0T/99Im+rfEbKRIPsi1yjQ71z66A2+VTnmGUfr/6YK9Qy1Zsf00zSE6W ia30Aq0+xlbJVQAfACQ9QoTnAx3Jahw0PcPnY3uM= 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.9 179/271] ext4: set error return correctly when ext4_htree_store_dirent fails Date: Tue, 28 Jan 2020 15:05:28 +0100 Message-Id: <20200128135905.866524195@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@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 9a13f86fed626..4df4d31057b36 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -1417,7 +1417,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