From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFC9AC2D0C6 for ; Wed, 11 Dec 2019 16:20:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A6D3A205C9 for ; Wed, 11 Dec 2019 16:20:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730190AbfLKQUH (ORCPT ); Wed, 11 Dec 2019 11:20:07 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:57899 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728912AbfLKQUG (ORCPT ); Wed, 11 Dec 2019 11:20:06 -0500 Received: from callcc.thunk.org (guestnat-104-132-34-105.corp.google.com [104.132.34.105] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id xBBGK0x7002440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Dec 2019 11:20:00 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id CCB6C421A48; Wed, 11 Dec 2019 11:19:59 -0500 (EST) Date: Wed, 11 Dec 2019 11:19:59 -0500 From: "Theodore Y. Ts'o" To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, stable@kernel.org, Andreas Dilger , linux-ext4@vger.kernel.org Subject: Re: [PATCH AUTOSEL 4.4 27/37] ext4: work around deleting a file with i_nlink == 0 safely Message-ID: <20191211161959.GB129186@mit.edu> References: <20191211153813.24126-1-sashal@kernel.org> <20191211153813.24126-27-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211153813.24126-27-sashal@kernel.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 11, 2019 at 10:38:03AM -0500, Sasha Levin wrote: > From: Theodore Ts'o > > [ Upstream commit c7df4a1ecb8579838ec8c56b2bb6a6716e974f37 ] > > If the file system is corrupted such that a file's i_links_count is > too small, then it's possible that when unlinking that file, i_nlink > will already be zero. Previously we were working around this kind of > corruption by forcing i_nlink to one; but we were doing this before > trying to delete the directory entry --- and if the file system is > corrupted enough that ext4_delete_entry() fails, then we exit with > i_nlink elevated, and this causes the orphan inode list handling to be > FUBAR'ed, such that when we unmount the file system, the orphan inode > list can get corrupted. > > A better way to fix this is to simply skip trying to call drop_nlink() > if i_nlink is already zero, thus moving the check to the place where > it makes the most sense. > > https://bugzilla.kernel.org/show_bug.cgi?id=205433 > > Link: https://lore.kernel.org/r/20191112032903.8828-1-tytso@mit.edu > Signed-off-by: Theodore Ts'o > Cc: stable@kernel.org > Reviewed-by: Andreas Dilger > Signed-off-by: Sasha Levin I'm confused; this was explicitly cc'ed to stable@kernel.org, so why is your AUTOSEL picking this up? I would have thought this would get picked up via the normal stable kernel processes. Thanks, - Ted