From: Ivan Delalande Subject: Re: [PATCH] vfs: Fix, simpliy and stop using d_dname for the /proc/*/ns/* files. Date: Wed, 3 Jun 2015 22:51:28 +0200 Message-ID: <20150603205128.GN22078@ycc.fr> References: <20150515185820.GQ20468@ycc.fr> <20150520100557.GB32189@mew> <87bnhedhw5.fsf_-_@x220.int.ebiederm.org> <20150520232325.GA7232@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Eric W. Biederman" , Omar Sandoval , linux-fsdevel@vger.kernel.org To: Al Viro Return-path: Received: from mail-wi0-f174.google.com ([209.85.212.174]:36097 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbbFCUvh (ORCPT ); Wed, 3 Jun 2015 16:51:37 -0400 Received: by wibdq8 with SMTP id dq8so104569175wib.1 for ; Wed, 03 Jun 2015 13:51:36 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20150520232325.GA7232@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, May 21, 2015 at 12:23:25AM +0100, Al Viro wrote: > On Wed, May 20, 2015 at 05:05:30PM -0500, Eric W. Biederman wrote: > > - dentry =3D d_alloc_pseudo(mnt->mnt_sb, &qname); > > + dentry =3D d_alloc_name(mnt->mnt_root, name); > > if (!dentry) { > > iput(inode); > > mntput(mnt); > > return ERR_PTR(-ENOMEM); > > } > > - d_instantiate(dentry, inode); > > + d_add(dentry, inode); >=20 > Careful - that might have non-trivial effects. Namely, you are makin= g > the root dentry of that sucker a contention point and adding to hash > pollution... It's probably not going to cause visible problems, but > it's worth profiling just to be sure. >=20 > Besides, you are violating a bunch of rules here - several hashed > children of the same directory with the same name all at once... > not nice. Hey Eric, did you have any thought about Al=E2=80=99s concerns? Thanks, --=20 Ivan "Colona" Delalande -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html