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=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 2CE5EC83000 for ; Wed, 29 Apr 2020 18:51:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 168C420661 for ; Wed, 29 Apr 2020 18:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727096AbgD2SvL convert rfc822-to-8bit (ORCPT ); Wed, 29 Apr 2020 14:51:11 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:48930 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbgD2SvL (ORCPT ); Wed, 29 Apr 2020 14:51:11 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 5A18D6071A61; Wed, 29 Apr 2020 20:51:08 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id NbIDHCmeZZST; Wed, 29 Apr 2020 20:51:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 008C262257A2; Wed, 29 Apr 2020 20:51:06 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TPdioTLx9-de; Wed, 29 Apr 2020 20:51:06 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id D3EA26089348; Wed, 29 Apr 2020 20:51:06 +0200 (CEST) Date: Wed, 29 Apr 2020 20:51:06 +0200 (CEST) From: Richard Weinberger To: stable Cc: linux-mtd , linux-kernel , John Ogness Message-ID: <1537701093.171645.1588186266734.JavaMail.zimbra@nod.at> In-Reply-To: <875zdibasg.fsf@vostro.fn.ogness.net> References: <20200119215233.7292-1-richard@nod.at> <875zdibasg.fsf@vostro.fn.ogness.net> Subject: Please queue ubifs: Fix ubifs_tnc_lookup() usage in do_kill_orphans() for stable (was: Re: [PATCH] ubifs: Fix ubifs_tnc_lookup() usage in do_kill_orphans()) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF68 (Linux)/8.8.12_GA_3809) Thread-Topic: Please queue ubifs: Fix ubifs_tnc_lookup() usage in do_kill_orphans() for stable (was: Re: [PATCH] ubifs: Fix ubifs_tnc_lookup() usage in do_kill_orphans()) Thread-Index: vuDlWTB9U53gSqUpBqsVy2sOOiFwnA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "John Ogness" > An: "richard" > CC: "linux-mtd" , "linux-kernel" > Gesendet: Mittwoch, 29. April 2020 16:56:31 > Betreff: Re: [PATCH] ubifs: Fix ubifs_tnc_lookup() usage in do_kill_orphans() > Hi Richard, > > Could you CC this patch to stable? It fixes a serious problem that I am > seeing on real devices (i.e. Linux not being able to mount its root > filesystem after a power cut). Thanks. Just checked again, better ask stable maintainers. :-) Stable maintainers, can you please make sure this patch will make it into stable? The upstream commit is: 4ab25ac8b2b5 ("ubifs: Fix ubifs_tnc_lookup() usage in do_kill_orphans()") I always thought havings a Fixes-Tag is enough to make sure it will get picked up. Isn't this the case? Thanks, //richard > John Ogness > > On 2020-01-19, Richard Weinberger wrote: >> Orphans are allowed to point to deleted inodes. >> So -ENOENT is not a fatal error. >> >> Reported-by: Кочетков Максим >> Reported-and-tested-by: "Christian Berger" >> Fixes: ee1438ce5dc4 ("ubifs: Check link count of inodes when killing orphans.") >> Signed-off-by: Richard Weinberger >> --- >> fs/ubifs/orphan.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c >> index 54d6db61106f..2645917360b9 100644 >> --- a/fs/ubifs/orphan.c >> +++ b/fs/ubifs/orphan.c >> @@ -688,14 +688,14 @@ static int do_kill_orphans(struct ubifs_info *c, struct >> ubifs_scan_leb *sleb, >> >> ino_key_init(c, &key1, inum); >> err = ubifs_tnc_lookup(c, &key1, ino); >> - if (err) >> + if (err && err != -ENOENT) >> goto out_free; >> >> /* >> * Check whether an inode can really get deleted. >> * linkat() with O_TMPFILE allows rebirth of an inode. >> */ >> - if (ino->nlink == 0) { >> + if (err == 0 && ino->nlink == 0) { >> dbg_rcvry("deleting orphaned inode %lu", > > (unsigned long)inum);