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=-4.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 533F4C2D0A8 for ; Mon, 28 Sep 2020 07:36:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7316D20BED for ; Mon, 28 Sep 2020 07:36:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="VEYznmnJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726727AbgI1Hgf (ORCPT ); Mon, 28 Sep 2020 03:36:35 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:20484 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726625AbgI1Hge (ORCPT ); Mon, 28 Sep 2020 03:36:34 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20200928073630epoutp020dd4fbb874b812d40405f08cfde757d4~44mT7vp3b0562805628epoutp02D for ; Mon, 28 Sep 2020 07:36:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20200928073630epoutp020dd4fbb874b812d40405f08cfde757d4~44mT7vp3b0562805628epoutp02D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1601278590; bh=/eNg35GSx+5wKcMvCxYpylGbCIBkVaA6FzkgrihSYWE=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=VEYznmnJlRN2nOzZIEl4JecZVnQ8Z+jqIgYL0bh7Vm1PZTsaTcTAFYgH2SIN2kwzW UbcIY/MrJXWKG3JFa8QsJht1WqQtM53tiJavz+/shNFnLUbYOHa1HI598Bl9VIUdSh byYtKks52FtXv2K/d4HwoNctRbvHW9BOnljxmzKY= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20200928073630epcas1p188bcd59a492f0225edf3698d260da55f~44mTawYbQ0605706057epcas1p1l; Mon, 28 Sep 2020 07:36:30 +0000 (GMT) Received: from epsmges1p2.samsung.com (unknown [182.195.40.162]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4C0Dq11nRQzMqYkW; Mon, 28 Sep 2020 07:36:29 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 6E.EC.09918.D72917F5; Mon, 28 Sep 2020 16:36:29 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20200928073628epcas1p370edee44b209aa1a652492e04ead4b98~44mSDqt6v1994219942epcas1p3A; Mon, 28 Sep 2020 07:36:28 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200928073628epsmtrp1b76ab81dd7a5844ac21b75b1920ffa8d~44mSDAxZa0720907209epsmtrp1T; Mon, 28 Sep 2020 07:36:28 +0000 (GMT) X-AuditID: b6c32a36-713ff700000026be-58-5f71927d6122 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id BD.49.08604.C72917F5; Mon, 28 Sep 2020 16:36:28 +0900 (KST) Received: from W10PB11329 (unknown [10.253.152.129]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200928073628epsmtip1b726d12d45b234b77eb964550f0c3aa2~44mR0kwuf2573825738epsmtip1F; Mon, 28 Sep 2020 07:36:28 +0000 (GMT) From: "Sungjong Seo" To: "'Tetsuhiro Kohada'" Cc: , , , "'Namjae Jeon'" , , In-Reply-To: <8a430d18-39ac-135f-d522-90d44276faf8@gmail.com> Subject: RE: [PATCH 2/3] exfat: remove useless check in exfat_move_file() Date: Mon, 28 Sep 2020 16:36:28 +0900 Message-ID: <8c9701d6956a$13898560$3a9c9020$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQGgZsB+KXs97exselB5tzyGrN5ddgLZy8s5AfgkmQwBsa3Piam1eW8Q Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFJsWRmVeSWpSXmKPExsWy7bCmgW7tpMJ4g/O/uCx+zL3NYvHm5FQW iz17T7JYXN41h83i8v9PLBbLvkxmsfgxvd6B3ePLnOPsHm2T/7F7NB9byeaxc9Zddo++LasY PT5vkgtgi8qxyUhNTEktUkjNS85PycxLt1XyDo53jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXL zAE6RUmhLDGnFCgUkFhcrKRvZ1OUX1qSqpCRX1xiq5RakJJTYGhQoFecmFtcmpeul5yfa2Vo YGBkClSZkJNx7fVRpoKvAhWz/0k0MC7j7WLk5JAQMJE4OvEcexcjF4eQwA5GiSvzvzFCOJ8Y Jb6f+cYM4XxjlDiw6wWQwwHWMnG1OUR8L6PEkb27WUFGCQm8ZJT48zoTxGYT0JV4cuMnM4gt IqAncfLkdTYQm1mgkUnixMtsEJtTwFZiwYazjCC2sICnROOXNSwgNouAqsSW/h6wmbwClhI/ Z8xngbAFJU7OfMICMUdbYtnC18wQLyhI7P50lBVil5vEzZ4uZogaEYnZnW1gD0gITOWQ+NM9 iRGiwUWibdkkqGZhiVfHt7BD2FISL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A12EwJAQWJ3Z+OskJc4SZxs6eLGaJGRGJ2Zxvz BEbhWUhGzUIyahaSUbOQtCxgZFnFKJlaUJybnltsWGCYl1quV5yYW1yal66XnJ+7iREcU1qa Oxi3r/qgd4iRiYPxEKMEB7OSCK9vTkG8EG9KYmVValF+fFFpTmrxIUZpDhYlcd4bhQvjhATS E0tSs1NTC1KLYLJMHJxSDUxbg1u93n41vOejpl/D0T35rpxGCk/1nPeLl0w5x67ya8qCU+mu iROi3zNOEJcKvTl7J0/ipiJ1t96oqfwciwo3BXlbbg58N9HNkps55thhppmy3tr857w0+xk7 ln6cduC9mGtu772LGamzPxgpBB++9Gxv4yL9ppN/3U71rNmXK3/tZ+KtiRF/koskirU/9WZZ lWvXd+rcqNKVWC/vYHNB22fD9oqMYzM1pwXG7JXR/TV/ieqVqkMa3oXV8Z3ysxS3t6r6bmva unzVkcXx4vEmDNUzXXetrnjW4Mp+qvRlzGvJj8lLo12cmXRrwwP9JS/npfy93fhb/PnlaAbZ jOs/GGcof4h82rhizv3HlkosxRmJhlrMRcWJABAJKLQYAwAA X-CMS-MailID: 20200928073628epcas1p370edee44b209aa1a652492e04ead4b98 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200911044511epcas1p4d62863352e65c534cd6080dd38d54b26 References: <20200911044506.13912-1-kohada.t2@gmail.com> <015f01d68bd1$95ace4d0$c106ae70$@samsung.com> <8a430d18-39ac-135f-d522-90d44276faf8@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > >> --- a/fs/exfat/namei.c > >> +++ b/fs/exfat/namei.c > >> =40=40 -1095,11 +1095,6 =40=40 static int exfat_move_file(struct inode > >> *inode, struct exfat_chain *p_olddir, > >> if (=21epmov) > >> return -EIO; > >> > >> - /* check if the source and target directory is the same */ > >> - if (exfat_get_entry_type(epmov) =3D=3D TYPE_DIR && > >> - le32_to_cpu(epmov->dentry.stream.start_clu) =3D=3D p_newdir->dir= ) > >> - return -EINVAL; > >> - > > > > It might check if the cluster numbers are same between source entry > > and target directory. >=20 > This checks if newdir is the move target itself. > Example: > mv /mnt/dir0 /mnt/dir0/foo >=20 > However, this check is not enough. > We need to check newdir and all ancestors. > Example: > mv /mnt/dir0 /mnt/dir0/dir1/foo > mv /mnt/dir0 /mnt/dir0/dir1/dir2/foo > ... >=20 > This is probably a taboo for all layered filesystems. >=20 >=20 > > Could you let me know what code you mentioned? > > Or do you mean the codes on vfs? >=20 > You can find in do_renameat2(). --- around 'fs/namei.c:4440' > If the destination ancestors are itself, our driver will not be called. I think, of course, vfs has been doing that. So that code is unnecessary in normal situations. That code comes from the old exfat implementation. And as far as I understand, it seems to check once more =22the cluster numb= er=22 even though it comes through vfs so that it tries detecting abnormal of on-= disk. Anyway, I agonized if it is really needed. In conclusion, old code could be eliminated and your patch looks reasonable= . Thanks Acked-by: Sungjong Seo >=20 >=20 > BTW > Are you busy now? I'm sorry, I'm so busy for my full time work :( Anyway, I'm trying to review serious bug patches or bug reports first. Other patches, such as clean-up or code refactoring, may take some time to = review. > I am waiting for your reply about =22integrates dir-entry getting and > validation=22 patch. As I know, your patch is being under review by Namjae. >=20 > BR > --- > Tetsuhiro Kohada