Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3766156pxt; Tue, 10 Aug 2021 10:49:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm08YOOGOMn2mnOM7SR/RYXyHRoetF/f67Oc5Un/EG8JhiWi7m2AaySHVLswgz22x5hOji X-Received: by 2002:a05:6e02:178a:: with SMTP id y10mr1004427ilu.139.1628617749818; Tue, 10 Aug 2021 10:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617749; cv=none; d=google.com; s=arc-20160816; b=Ec62q+WALtu+iIbL6xWseMN+iOg0+aQmcdNLWe8WCjc/UBC6ejAdhpUl5IWtFggId7 5jBLJI2W3Rkjpoo3NurF5l2xiA8xSzAenQ0IdVE6Doud7ZTLogjr+nsjzwTUBta3Ber2 KOfvUdIaIuopo55egBiDK64Ljp3UXnM0fkRGegqe7qDYunfe5cxCiS/xrRZ9rMFMPS7w QmEV4CtNTvwXUY5gNwulNkPJxEfAF8EnJxxoMH/J2M2I2XcWEnJ0DksXx06NKQt12Fp3 P2o0qqGs2mGE7a2TSVmCBTacL6ofvUgO/oOuzdFLXKkOWxF+cAViZIWhnqWyC8NxFTew ur/w== 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=5/lVCgjuCwFs8LsH1XDoKF7XGNFoMVEHMqf4yBF4WE8=; b=V+swefRPgExngz5nfZG7yJFoBF94/p/9ZT4NphnRNGJQuWWGm9jS7wGpNi8ZMrRi44 N2DV0nJQwi/x/aPHps/MdsaAletAdzz6ahCoaA7qtD4eZ5BlBqyuq7/9q34Wjc6HYtQu cqZq224AlpYScwPt6umpc+20yQza1IGCq2YmPoMeYPsdFzLk5ZOce9pYJEOS9w8s09ZI INa0uLp/Chwddcn+24SaZ5ogwcGBmkPRokMtQovfuiBWP0yjqNYyZP2qQcp/wKJ6Lanu dnkW/kwbK1dSgz+xhTsGvgg6jCQEbxURxNMuYcsEyQ9jES6CgT5pY3Z+zCIJ80KdbwDg cQMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JR9uvuRO; 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 e9si22436295ios.63.2021.08.10.10.48.54; Tue, 10 Aug 2021 10:49: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=JR9uvuRO; 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 S232813AbhHJRsd (ORCPT + 99 others); Tue, 10 Aug 2021 13:48:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:54474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234556AbhHJRp1 (ORCPT ); Tue, 10 Aug 2021 13:45:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0FF156115B; Tue, 10 Aug 2021 17:40:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617209; bh=YjbAydlqviTwjmvCKNoOKJhzMIcLIu+Ix2yfhbgj7r4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JR9uvuRO33tONY93lcQsW/uFWq++5mLBooXWvCMejQ7QGrPK2ByPhxqOCHdXhij5T zIFQc6KlRzySfhnwMK9ma977F667wSrskHi599o2bBe7mQcQqIdv4tHmYEA8CPhJGC rHRCIO0di1O/sx4IJULap/KqGSbFSRktz5YzpFcs= 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 5.10 093/135] ext4: fix potential htree corruption when growing large_dir directories Date: Tue, 10 Aug 2021 19:30:27 +0200 Message-Id: <20210810172958.914384725@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@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 @@ -2412,7 +2412,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;