Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3757181pxt; Tue, 10 Aug 2021 10:36:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfs90rvpEC1HtGckwqAYvBgVemdqBEVGF02NoND+7rkOXesZk7GZWRWYcXLGDnjpEqfF23 X-Received: by 2002:a05:6402:1d0d:: with SMTP id dg13mr6327699edb.312.1628616963986; Tue, 10 Aug 2021 10:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628616963; cv=none; d=google.com; s=arc-20160816; b=icqp/G/xq/mb96QiPJpDhhPLT3NKMfVdWrE/O5Al2+PmC8fKNyGmY5OLYUq6xcXQy6 jj2H+UuhFk9wcbKZZhF+S6Z1b69F5f/TICoKgogYEBXL91dMfNSkoJ8dZqgzrdI5HUEn 6+SDsr5FGvRfqeqU0dX8it8M+Ht43zDO+8ki63GmiXbhOMr5DK1rHghhnM8ExOesufFh Qgesj11XXsHs6nEdv5LTrt7n/e3XJ72uutqDdlmHRnAdcVVTBPXKLYQVvGmfyeW6y/N7 DSwvh/PvEhC4EQqMRJAUl9FeiJN2GU2zYmkyYkrHgqzO2+SOye2xEoHLALHuoOHfkNJ5 WGqQ== 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=rKhWg58DlnpEMkRCG0npvJXhs8HfnR/tKpN7Y8lGV3M=; b=Li0oIsUBfPphLv0KwX9w7vdTENMNaNKXjXYrl+Wm6FcKa8f6WIj79Wqp/rYvGJQqBE 4TLvTzfiHxWVak3tZHsVnwCjCSAZctjOXwqHEclwBrAmVYPIZQ0/VrAFBADELlsu9wQO xjohDf8w0y7HAIsb2GTHj7wnKQgMMH9tm2cuAGgKU3owybdZDSM3hrjBrqlq1fCqVXRe gNV3eryM8HxoiuGrsWa4b+jd55MuP0iCJY+BP29FU3ccbArunbw14oDAev9wmefi5ybZ Wxeq7V/68UzQNWo8cxyKeRO5jOZt0/Y9bnSPq0iRtetsGjLVIo9p1hOKqZXCmYsiUtgu GGzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S8iFgbcN; 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 x2si25364637ejy.385.2021.08.10.10.35.39; Tue, 10 Aug 2021 10:36:03 -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=S8iFgbcN; 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 S232465AbhHJRd6 (ORCPT + 99 others); Tue, 10 Aug 2021 13:33:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:35042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232327AbhHJRdR (ORCPT ); Tue, 10 Aug 2021 13:33:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 25F1E60FC4; Tue, 10 Aug 2021 17:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616775; bh=uNj46yeC67x14SBlDSDwioGQohfjz0YFWOU/21UIun4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S8iFgbcNbxA4W5zhu3QBD2NgCUdwRybR4J2dioSxwuxdbV0ZPa6tXtO3qOYMXhQ1y 2Nnh3x0f4nHHMDl9A1aETvhNz0vjpTLNGgIBsQe11NHlME+VyCIQY7q2hKZn4oaMPk IUnktQCLBCTHQvGwq7D0KH0sitJPG32rIGWLCDsY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?=D0=91=D0=BB=D0=B0=D0=B3=D0=BE=D0=B4=D0=B0=D1=80=D0=B5=D0=BD=D0=BA=D0=BE=20=D0=90=D1=80=D1=82=D1=91=D0=BC?= , Denis , Theodore Tso , stable@kernel.org Subject: [PATCH 4.19 40/54] ext4: fix potential htree corruption when growing large_dir directories Date: Tue, 10 Aug 2021 19:30:34 +0200 Message-Id: <20210810172945.509846502@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172944.179901509@linuxfoundation.org> References: <20210810172944.179901509@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: Theodore Ts'o commit 877ba3f729fd3d8ef0e29bc2a55e57cfa54b2e43 upstream. Commit b5776e7524af ("ext4: fix potential htree index checksum corruption) removed a required restart when multiple levels of index nodes need to be split. Fix this to avoid directory htree corruptions when using the large_dir feature. Cc: stable@kernel.org # v5.11 Cc: Благодаренко Артём Fixes: b5776e7524af ("ext4: fix potential htree index checksum corruption) Reported-by: Denis Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman --- fs/ext4/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2317,7 +2317,7 @@ again: goto journal_error; err = ext4_handle_dirty_dx_node(handle, dir, frame->bh); - if (err) + if (restart || err) goto journal_error; } else { struct dx_root *dxroot;