Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1283831pxb; Fri, 1 Apr 2022 09:11:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/GY9r80bvUJB7/e5AC5KVdphMQzF53NDahOn8C/C5FPUxm0vt56V1BN10r4yxMggZr/Pa X-Received: by 2002:a05:6870:d211:b0:de:4e33:1717 with SMTP id g17-20020a056870d21100b000de4e331717mr5264845oac.286.1648829460235; Fri, 01 Apr 2022 09:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648829460; cv=none; d=google.com; s=arc-20160816; b=XX1pSVWF5UWHpCa7pdj+3yQyeXc7CKI+yQKiawOxV8ZnWgUv/iJwg3dY2h/3v5Me78 L0TOEG7LrLi6ecD2rLejUhMuNmnzZ5OptlcbF3j7/Mh0laZJn5+vk6tmBSHgNndAadKp RXV4BQnxhmkqODDQ6DoTiPSWuFfjKxE+azo90YXI+n7Minfskqqi+YKFdYYCGbn7v21M WI01BlB42zEqMEoCF8cz+dO2RHp7OOVq2diNF10kk8X1blBbjV1+PPiDDhSZtKi4cNZS NDAmo/8Ci8/6hHgy96ZA1FtuaynzWZWTWlqoLOEfgymgnCrKGb9kbtpD3JuCur61bVWx hHpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:references :in-reply-to:mime-version:dkim-signature; bh=fTtaBmSb/8m94hpcBEjXUrSmjAANu73K350+CuQAvWY=; b=dfdM4AoxjbAR+MuTfdOKZhAjLUm+NYvg34ZP9R/Wtnr0yz75lFEfUKRnB5It0z15X1 YJVEqREEcU9mbg2BTwR8V+J0PU82gcY7dn6vKH3j7TNCmeYpm2HtEc7GDIHmNX53bYa4 Vy2FBfhSRVa8EZHQSAiJWvqQ9S2fwmqTTH/5+nAjoMI8FZ/qWJB1VUh4QedeYCoBmUiv GeGg2A5nADW05uTBQDPzUOyAMVBoS5i4TYk4cO0BX48fFl46rPvsK7JLq4U5XPlb5f2Q 0m86L0/hQTQXAnBabrp9bo6en5NWVOky1wL2Yby13hae0sx23twwOpa45hq4+kBi1fyI b5bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uK6CGH4P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i124-20020aca3b82000000b002ef0c3476a2si1765125oia.290.2022.04.01.09.10.44; Fri, 01 Apr 2022 09:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uK6CGH4P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346063AbiDAM7p (ORCPT + 99 others); Fri, 1 Apr 2022 08:59:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346045AbiDAM7l (ORCPT ); Fri, 1 Apr 2022 08:59:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96B93279727; Fri, 1 Apr 2022 05:57:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 144EC61A24; Fri, 1 Apr 2022 12:57:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75656C340EC; Fri, 1 Apr 2022 12:57:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648817870; bh=SPrhf2bVEi/6vQbnB5Pouibt1P7dIQ/CyWTlONOSVWU=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=uK6CGH4P+acUiNdRe0aMKstxYuluknO0/KVTzTbkEqPi9Yxm20U4NSgyaseqkeMWP qWAXBKzQ+GELcZVhGg0ohVvdxj/rU5LFWp64dqcYyNNje25Pkt+LxCCQwWv3oIBSnI cVXCeGHR7bG/J3Gfkye9d2Sw3WgFPQlxsbWNWEPqi+CBaUmHRx6WQXNW7i7ZsYlP42 ST45Mna1vNdIP9vMHvxXGgxKc9r+F9qyknAiA5Xr8M+bteK7MEtyX1RlRxUX2g3urK TOiKAE3fNDlP2WOhO92pBHgkp+Mu/doyXMsJXdy02Sc0gbXA4Ehs2foyvFjrpYT1Pa 8JGHFDwFKuHKw== Received: by mail-wr1-f54.google.com with SMTP id r13so4114453wrr.9; Fri, 01 Apr 2022 05:57:50 -0700 (PDT) X-Gm-Message-State: AOAM531cxjm7MvFyqZQ9wFJ6h0x/5AdBv4MkHbH58IRaCMshqKWURJDL +ezcYj9fyyY7g1QWRA84HrPY1wvA+9l78eoP7rk= X-Received: by 2002:a5d:47a5:0:b0:203:d4fd:4653 with SMTP id 5-20020a5d47a5000000b00203d4fd4653mr7912969wrb.229.1648817868715; Fri, 01 Apr 2022 05:57:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6000:2c1:0:0:0:0 with HTTP; Fri, 1 Apr 2022 05:57:48 -0700 (PDT) In-Reply-To: <818b01d845b4$07f97b50$17ec71f0$@samsung.com> References: <818b01d845b4$07f97b50$17ec71f0$@samsung.com> From: Namjae Jeon Date: Fri, 1 Apr 2022 21:57:48 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] exfat: remove exfat_update_parent_info() To: Yuezhang Mo Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Sungjong Seo , Andy Wu , Aoyama Wataru , Daniel Palmer Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2022-04-01 19:34 GMT+09:00, Sungjong Seo : >> exfat_update_parent_info() is a workaround for the wrong parent directory >> information being used after renaming. Now that bug is fixed, this is no >> longer needed, so remove it. >> >> Signed-off-by: Yuezhang Mo >> Reviewed-by: Andy Wu >> Reviewed-by: Aoyama Wataru >> Reviewed-by: Daniel Palmer > > As you said, exfat_update_parent_info() seems to be a workaround > that exists from the legacy code to resolve the inconsistency of > parent node information. > > Thanks for your patch! > Reviewed-by: Sungjong Seo Hi Yuezhang, I don't think there's any reason to split this patch from patch 1/2. Any thought to combine them to the one ? Thanks. > >> --- >> fs/exfat/namei.c | 26 -------------------------- >> 1 file changed, 26 deletions(-) >> >> diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index >> e7adb6bfd9d5..76acc3721951 100644 >> --- a/fs/exfat/namei.c >> +++ b/fs/exfat/namei.c >> @@ -1168,28 +1168,6 @@ static int exfat_move_file(struct inode *inode, >> struct exfat_chain *p_olddir, >> return 0; >> } >> >> -static void exfat_update_parent_info(struct exfat_inode_info *ei, >> - struct inode *parent_inode) >> -{ >> - struct exfat_sb_info *sbi = EXFAT_SB(parent_inode->i_sb); >> - struct exfat_inode_info *parent_ei = EXFAT_I(parent_inode); >> - loff_t parent_isize = i_size_read(parent_inode); >> - >> - /* >> - * the problem that struct exfat_inode_info caches wrong parent >> info. >> - * >> - * because of flag-mismatch of ei->dir, >> - * there is abnormal traversing cluster chain. >> - */ >> - if (unlikely(parent_ei->flags != ei->dir.flags || >> - parent_isize != EXFAT_CLU_TO_B(ei->dir.size, sbi) || >> - parent_ei->start_clu != ei->dir.dir)) { >> - exfat_chain_set(&ei->dir, parent_ei->start_clu, >> - EXFAT_B_TO_CLU_ROUND_UP(parent_isize, sbi), >> - parent_ei->flags); >> - } >> -} >> - >> /* rename or move a old file into a new file */ static int >> __exfat_rename(struct inode *old_parent_inode, >> struct exfat_inode_info *ei, struct inode *new_parent_inode, >> @@ -1220,8 +1198,6 @@ static int __exfat_rename(struct inode >> *old_parent_inode, >> return -ENOENT; >> } >> >> - exfat_update_parent_info(ei, old_parent_inode); >> - >> exfat_chain_dup(&olddir, &ei->dir); >> dentry = ei->entry; >> >> @@ -1242,8 +1218,6 @@ static int __exfat_rename(struct inode >> *old_parent_inode, >> goto out; >> } >> >> - exfat_update_parent_info(new_ei, new_parent_inode); >> - >> p_dir = &(new_ei->dir); >> new_entry = new_ei->entry; >> ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh); >> -- >> 2.25.1 > >