From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga02-in.huawei.com ([119.145.14.65]:40164 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751922AbcF2JZY (ORCPT ); Wed, 29 Jun 2016 05:25:24 -0400 Subject: Re: Q. hlist_bl_add_head_rcu() in d_alloc_parallel() To: Al Viro , Linus Torvalds References: <20160617221614.GE14480@ZenIV.linux.org.uk> <2123.1466313884@jrobl> <20160619165557.GH14480@ZenIV.linux.org.uk> <28627.1466397254@jrobl> <20160620053530.GI14480@ZenIV.linux.org.uk> <20287.1466644756@jrobl> <20160623025809.GT14480@ZenIV.linux.org.uk> <20160625225423.GV14480@ZenIV.linux.org.uk> <20160629081705.GZ14480@ZenIV.linux.org.uk> CC: linux-fsdevel From: Hekuang Message-ID: <57739338.8030906@huawei.com> Date: Wed, 29 Jun 2016 17:22:00 +0800 MIME-Version: 1.0 In-Reply-To: <20160629081705.GZ14480@ZenIV.linux.org.uk> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 在 2016/6/29 16:17, Al Viro 写道: > On Sat, Jun 25, 2016 at 06:25:58PM -0700, Linus Torvalds wrote: >> On Sat, Jun 25, 2016 at 3:54 PM, Al Viro wrote: >>> BTW, speaking of that area - is there any reason why dentry_cmp() >>> isn't simply >>> return dentry_string_cmp(lockless_dereference(dentry->d_name.name), >>> ct, tcount); >>> other than "it predates lockless_dereference()"? >> No, the only important thing is that it's a read-once, and has the >> smp_read_barrier_depends(). >> >> So lockless_derefence() looks like the right thing to do, it is just >> that - as you suspected - the code predates that concept. > ... and as the matter of fact, patch to that effect (only cosmetically different > from what I'd cooked) had been posted by He Kuang back in March. At least > I'd spotted that before pushing mine out... > > The patch posted back then applied, with slightly edited commit message. Apologies > for missing it... Its okay and really appreciate you remembering, I've forgotten that patch if not mentioned. :-) Thank you.