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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 0644DC433DB for ; Sat, 23 Jan 2021 10:06:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD1F622273 for ; Sat, 23 Jan 2021 10:06:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726754AbhAWKGH convert rfc822-to-8bit (ORCPT ); Sat, 23 Jan 2021 05:06:07 -0500 Received: from lithops.sigma-star.at ([195.201.40.130]:43934 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbhAWKGF (ORCPT ); Sat, 23 Jan 2021 05:06:05 -0500 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id B54DA6074007; Sat, 23 Jan 2021 11:05:22 +0100 (CET) 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 iF0YWO0cr0Iq; Sat, 23 Jan 2021 11:05:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 0006C625DE06; Sat, 23 Jan 2021 11:05:20 +0100 (CET) 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 Artg8sMjyD81; Sat, 23 Jan 2021 11:05:20 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id CF7986074007; Sat, 23 Jan 2021 11:05:20 +0100 (CET) Date: Sat, 23 Jan 2021 11:05:20 +0100 (CET) From: Richard Weinberger To: chengzhihao1 Cc: linux-mtd , david , linux-kernel , stable Message-ID: <311070065.273732.1611396320672.JavaMail.zimbra@nod.at> In-Reply-To: <5b51ff9c-8f5e-c348-5195-c0a0bf60b746@huawei.com> References: <20210122212229.17072-1-richard@nod.at> <20210122212229.17072-4-richard@nod.at> <5b51ff9c-8f5e-c348-5195-c0a0bf60b746@huawei.com> Subject: Re: [PATCH 3/4] ubifs: Update directory size when creating whiteouts 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 - FF78 (Linux)/8.8.12_GA_3809) Thread-Topic: ubifs: Update directory size when creating whiteouts Thread-Index: lBYr5nCGsjlO2WH9TnqNoD/UEPd7gA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "chengzhihao1" > An: "richard" , "linux-mtd" > CC: "david" , "linux-kernel" , "stable" > Gesendet: Samstag, 23. Januar 2021 03:45:15 > Betreff: Re: [PATCH 3/4] ubifs: Update directory size when creating whiteouts > 在 2021/1/23 5:22, Richard Weinberger 写道: >> Although whiteouts are unlinked files they will get re-linked later, > I just want to make sure, is this where the count is increased? > do_rename -> inc_nlink(whiteout) Exactly. The logic is a little wicked, I agree. Let me think again whether there isn't a better way to address the problem. Thanks, //richard P.s: Thanks a lot for reviewing!