Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp929721ybm; Wed, 27 May 2020 11:25:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSOFy+ALoGAnY/b6AQ2NvJzg9BdIPFxb1wsEvJ6Sv67Prf1vSx6ndf70UNwngkBW/+K+kg X-Received: by 2002:a05:6402:1d30:: with SMTP id dh16mr24430854edb.302.1590603932184; Wed, 27 May 2020 11:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590603932; cv=none; d=google.com; s=arc-20160816; b=1J8L21qgwtgFvgelgQe6LntfX3B0d3ZFsxd9ZjWIdnLwg24gL9TJvEuGthJq5sk1gv EdyVH3AuZ//BkmxI/RwE+8iELLFfhk1uaNB2i9KGOm+LJGh3CuRPH/7e45iMWYf7sdwM sAMhUqlIUJOkinvQWRJt5LnjrtZ4RZ9ItJHW4ebffbWvz51xuDogM8u5rUPYv1/jBi0K 6vvsvOj3EmEDuctAKQwMw/YHV4svZ3pMKaqcttBYlVYh6elY09lrZGrgFg8kh+tlJt4N BTjasd9y6QAmbqG20ClWfqnKrBCOtjlef/MsBJxcw9ot0PWk/iNtEyCBF/tPdvuyR/y+ gmgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:cc:to:from :dkim-signature:dkim-filter; bh=8AMzre57Rup3O+2yQwlsUsj50VyKkmZ2g+QwOJq+y7Y=; b=Yl9LOx4zp38Hf9yFcqIdV7Jdt6/TqtC8eEUS0m3JFiEUge2bO+7HrCM8j6mAzzMIuN BOvxLhvn8++AXdzEHGgG6yQz4n07JuzYjEA8CITYH/NUWp3ZewW6TyE5I3WwHhf9p904 bQVrsxjCfPPCM3x92JdxzS+ZLT965scobl8hMczG0iIvQ0U2yu9MtGkDeMfmGLCNIRLr eMeBQzKTT1pqsRGz19BVkTvY9orEuxWUnGKrsjOgWa6MX5nXxG68917KSXv6w2bXXvmg oiSMLHrVZPg4HU/zBEmi+LeC4pxnVw79C25ZpQUW5D2CUlggYX+TMdnBcZqtuVWIF5Al bJoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=W9kEaIQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si2560958ejc.469.2020.05.27.11.25.09; Wed, 27 May 2020 11:25:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=W9kEaIQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389160AbgE0OZf (ORCPT + 98 others); Wed, 27 May 2020 10:25:35 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:52010 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387813AbgE0OZf (ORCPT ); Wed, 27 May 2020 10:25:35 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200527142533epoutp046d043c67ab2f0cf74616bc5f9e5dfd15~S6MDLtwt72449624496epoutp04c for ; Wed, 27 May 2020 14:25:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200527142533epoutp046d043c67ab2f0cf74616bc5f9e5dfd15~S6MDLtwt72449624496epoutp04c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1590589533; bh=8AMzre57Rup3O+2yQwlsUsj50VyKkmZ2g+QwOJq+y7Y=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=W9kEaIQjNj5JhOT8uf0y1EDi7qscje+3NIJC9xkOY4DPrY9P/SMSS8n+GbP3vkuVi nnADxkuU+7XDAPxVlNF3DaGD22g7xCOLCePJB8LPRTAimk8j5013WEXsWoTq2ljqhK fGGMQsWn4sdCMBSeWaYxxtRHNrNxhhkVjRF5PQ/8= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200527142532epcas1p259f002e2149e64a3fb8962df982d75eb~S6MCexqye2537825378epcas1p2F; Wed, 27 May 2020 14:25:32 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.40.165]) by epsnrtp4.localdomain (Postfix) with ESMTP id 49XCmC3dgszMqYkY; Wed, 27 May 2020 14:25:31 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 2B.3B.04388.B587ECE5; Wed, 27 May 2020 23:25:31 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200527142531epcas1p152d74fcd78d072f6123ad550da7b6619~S6MBMPItD1754017540epcas1p1U; Wed, 27 May 2020 14:25:31 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200527142531epsmtrp23fc003863097bebb120da62b6ebb444f~S6MBLh8_B1203612036epsmtrp2b; Wed, 27 May 2020 14:25:31 +0000 (GMT) X-AuditID: b6c32a35-793ff70000001124-13-5ece785b9420 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 20.91.08303.A587ECE5; Wed, 27 May 2020 23:25:30 +0900 (KST) Received: from W10PB11329 (unknown [10.253.152.129]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200527142530epsmtip11c0ad50e370ff13ed85241c5137d68bc~S6MA84F9u2634626346epsmtip1g; Wed, 27 May 2020 14:25:30 +0000 (GMT) From: "Sungjong Seo" To: "'Namjae Jeon'" , "'Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp'" Cc: "'Mori.Takahiro@ab.MitsubishiElectric.co.jp'" , "'Motai.Hirotaka@aj.MitsubishiElectric.co.jp'" , "'Namjae Jeon'" , , , In-Reply-To: Subject: RE: [PATCH] exfat: optimize dir-cache Date: Wed, 27 May 2020 23:25:30 +0900 Message-ID: <000701d63432$ace24f10$06a6ed30$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQKbEd8GOCYeHYQBe/Vm0kX/gmqw5wMD/7F2AWi7CpYCLmCEuwJD5ds7putEalA= Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0hTYRjm2znbzsrVaVq9rah1MkxjuuOaniSz0mKRqBV0MdIOenLW2YWd LSqIbrKadNOyaNmFIi1DC5PUmUV2MUulK5QhQUnQPbfKWVBtO0X+e97vfZ7veZ/vewlMdVmm JootDs5uYXlKNgy/cjNWp121sTtP5/GOZwLHX+DMh44KnCk7fBZjrrZ24Mxjb6WMefzbhzNV Xw/iTODI1jmE8Wtlu9zoOvhLbtx557zM2OzplRvra9wy476GGmT010/Mkefys0wcW8jZNZyl wFpYbClKpRYtzU/PNyTpaC09k0mmNBbWzKVSGZk52gXFfHAoSrOB5Z3BoxxWEKiE2bPsVqeD 05isgiOV4myFvI3W2eIF1iw4LUXxBVZzCq3TJRqCzDW8aXfJU5mtOmLjo1sebBs6oyhFBAHk DLjVailFwwgV2YSg48hLiVj4ELjfD+Bi4UfwuXa7rB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rzE9rdzmCE+UJDY/ekoK4gt IuAn8fHjWVaIGhGJ2Z1tzBMYhWchGTULyahZSEbNQtKygJFlFaNkakFxbnpusWGBUV5quV5x Ym5xaV66XnJ+7iZGcKxpae1g3LPqg94hRiYOxkOMEhzMSiK8TmdPxwnxpiRWVqUW5ccXleak Fh9ilOZgURLn/TprYZyQQHpiSWp2ampBahFMlomDU6qByYdj/rKnl4Q5FlyJ6Eic5xGyQTvb pUS20sF48h01rvMHPq8+eax7rlNqzvvOhjfLq9hPnoi7zs2fkXbqP/fNudqbt204tWL6VM+Q S3l/tui2XA8JVaz/MOHVjFNcs6pfBVoXzFur6z/p1bYPv1T3rlsiLSlzUVfx1KkgyZv7chf6 X1VJW21ZPXVh9dtiofvML1+t7WYLe5YuP+N2cM7suy2zvdbabVdgzGS1XXv1vuuusolt+jI2 sw/58cgKBcz2nvfk4c/sNw6mZ6TUnM82TpGfG/i0wOY869QED2/vErb4lfxHJU1EaoyUbpeu Ldr/u+H9Z8Xo2+w8Hybmnuk/Fd84ffK1/Uwf7RtsTnSveKzEUpyRaKjFXFScCAA+aJ8aJAMA AA== X-CMS-MailID: 20200527142531epcas1p152d74fcd78d072f6123ad550da7b6619 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: 20200520075735epcas1p269372d222e25f3fd51b7979f5b7cdc61 References: <20200520075641.32441-1-kohada.tetsuhiro@dc.mitsubishielectric.co.jp> <055a01d63306$82b13440$88139cc0$@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 2020-05-27 17:00 GMT+09:00, > Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp > : > > Thank you for your comment. > > > > >> + for (i = 0; i < es->num_bh; i++) { > > >> + if (es->modified) > > >> + exfat_update_bh(es->sb, es->bh[i], sync); > > > > > > Overall, it looks good to me. > > > However, if "sync" is set, it looks better to return the result of > > exfat_update_bh(). > > > Of course, a tiny modification for exfat_update_bh() is also required. > > > > I thought the same, while creating this patch. > > However this patch has changed a lot and I didn't add any new error > > checking. > > (So, the same behavior will occur even if an error occurs) > > > > >> +struct exfat_dentry *exfat_get_dentry_cached( > > >> + struct exfat_entry_set_cache *es, int num) { > > >> + int off = es->start_off + num * DENTRY_SIZE; > > >> + struct buffer_head *bh = es->bh[EXFAT_B_TO_BLK(off, es->sb)]; > > >> + char *p = bh->b_data + EXFAT_BLK_OFFSET(off, es->sb); > > > > > > In order to prevent illegal accesses to bh and dentries, it would > > be better to check validation for num and bh. > > > > There is no new error checking for same reason as above. > > > > I'll try to add error checking to this v2 patch. > > Or is it better to add error checking in another patch? > The latter:) > Thanks! Yes, the latter looks better. Thanks! > > > > BR > > --- > > Kohada Tetsuhiro