Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp412930iol; Thu, 9 Jun 2022 06:25:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/60suLgspm1MrY6qwZh5scnA3/dy0CrFyoTA5WB0PoPpUwdi1TmXc25T036hVPDwEQlS/ X-Received: by 2002:a63:1209:0:b0:3fc:e453:5424 with SMTP id h9-20020a631209000000b003fce4535424mr33306805pgl.131.1654781113422; Thu, 09 Jun 2022 06:25:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654781113; cv=none; d=google.com; s=arc-20160816; b=U7xNcM4n05xk5coNNCDwLi/b6pvc+88MM/4vWrYkJg9xfy+2fNLB7dYWMoHXruddwt nqxkk1+y8yMKALJP38OKDUaVpGICJjbVrNn/4kvffs2Wr27sB3TiT60H/kTjsswmAras wLvq4OlUvxooCMkVdb9Wf7RADVltqq6pQxhFpfMwgOUh4h9GyjRWNs1zJpYCWPWGvqJl 3oT1Ama2WLq/wpOfxcYSramNumV7EZYbfX/rE3WuLwh7aYzm1VnED5Xq5lfO0CJkl3xD nxHqALkCevSTBuqnT7cT8aoPI4rdN27k12rTmqEbGzxjJb/yqCN9+XDZ18xVdUH1xdeX cdvg== 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=MPcMQ41HLrc/IOjg0nu4+FGIsqHgomusGWnWSPlu8rs=; b=PMa2hz8nsImqeMYY4F52yM/3xumsaFMX15wSXB8OBXDj9d/Y17zIKQJNj5rmOFDxLw ybwHQzTzbs91XaoPrva3uTgp9IIHq1NCcr5UhtxYftGEH+b6ibG8JoYlPmSkpe88wIIa Lxtfm0kma4IQjwnxGoCV1tdvOVCKUlMbNHxRkV/p0eFfItQBSB+F5vANEThs/Z80phqp I8vtLCJGStZYwdwAqJNbpp+8MqVNuT/oQcHrnpBwGw6fi9pOZiiEBE8nvfRwVopkB055 KWGzE1CPwq39ACVELtkii3RKAj+40zay89uOVWM3mjGJ2TG+RBX/2yLGmQ39feFPs5A3 w4lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S0lPxoEe; 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 jc20-20020a17090325d400b00153b2d16497si16489010plb.159.2022.06.09.06.24.52; Thu, 09 Jun 2022 06:25:13 -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=S0lPxoEe; 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 S245423AbiFIMff (ORCPT + 99 others); Thu, 9 Jun 2022 08:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236095AbiFIMfe (ORCPT ); Thu, 9 Jun 2022 08:35:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3215F22BCF; Thu, 9 Jun 2022 05:35:33 -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 ams.source.kernel.org (Postfix) with ESMTPS id DFBA3B82D89; Thu, 9 Jun 2022 12:35:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E30EC341C0; Thu, 9 Jun 2022 12:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654778130; bh=MPcMQ41HLrc/IOjg0nu4+FGIsqHgomusGWnWSPlu8rs=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=S0lPxoEeUYlxxGn7ul/0YW2mp0NYFEuIHb0tv7qTdyFh9g+R3YA9A9RJRSd6UYPji /REsQXJhcG1Ub1rPHKtbxuqg3nM7aVRP7inCVKkefd2Heo2WJMPA0WV2s6JX50yxdj C/+kqAVWnq3nvpOrrdi1+AuJQPDOv8qCNPtpfZS1X1YmDddj827lq3yU1SeJnKNUU4 vL2v8XrmmmIeSHD7XhPXuoojw1CgEBcPJnC4Cux+DrjuOJZVkJl/roGR1FQsgo0jIB sO+Lt4Y1zKnAYwOoqiArO6W3J7dwUQ41c1G8PLYMCj9EvC1gijb7B6ncZPWVQaQMny zh9XUyUf7d9Hw== Received: by mail-wr1-f43.google.com with SMTP id a15so23702734wrh.2; Thu, 09 Jun 2022 05:35:30 -0700 (PDT) X-Gm-Message-State: AOAM53020sVMGuRaVUT3jn/itiC2BXmbZCDgWv5Ve2dLIEbi5A7PBtV5 MiBg5pzVpA+n716/FrvYkMhRNLRLEgCqSl4I9Zk= X-Received: by 2002:a5d:43d2:0:b0:218:3fe6:4127 with SMTP id v18-20020a5d43d2000000b002183fe64127mr21421249wrr.62.1654778128805; Thu, 09 Jun 2022 05:35:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:4c4a:0:0:0:0:0 with HTTP; Thu, 9 Jun 2022 05:35:28 -0700 (PDT) In-Reply-To: <20220608020408.2351676-1-sj1557.seo@samsung.com> References: <20220608020408.2351676-1-sj1557.seo@samsung.com> From: Namjae Jeon Date: Thu, 9 Jun 2022 21:35:28 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] exfat: use updated exfat_chain directly during renaming To: Sungjong Seo Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.3 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-06-08 11:04 GMT+09:00, Sungjong Seo : > In order for a file to access its own directory entry set, > exfat_inode_info(ei) has two copied values. One is ei->dir, which is > a snapshot of exfat_chain of the parent directory, and the other is > ei->entry, which is the offset of the start of the directory entry set > in the parent directory. > > Since the parent directory can be updated after the snapshot point, > it should be used only for accessing one's own directory entry set. > > However, as of now, during renaming, it could try to traverse or to > allocate clusters via snapshot values, it does not make sense. > > This potential problem has been revealed when exfat_update_parent_info() > was removed by commit d8dad2588add ("exfat: fix referencing wrong parent > directory information after renaming"). However, I don't think it's good > idea to bring exfat_update_parent_info() back. > > Instead, let's use the updated exfat_chain of parent directory diectly. > > Fixes: d8dad2588add ("exfat: fix referencing wrong parent directory > information after renaming") > > Signed-off-by: Sungjong Seo Applied, Thanks for your patch!