From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Delalande Subject: Re: [PATCH] vfs: Fix, simpliy and stop using d_dname for the /proc/*/ns/* files. Date: Sat, 6 Jun 2015 22:08:28 +0200 Message-ID: <20150606200828.GR22078@ycc.fr> References: <20150515185820.GQ20468@ycc.fr> <20150520100557.GB32189@mew> <87bnhedhw5.fsf_-_@x220.int.ebiederm.org> <20150520232325.GA7232@ZenIV.linux.org.uk> <20150603205128.GN22078@ycc.fr> <87pp58wsbn.fsf@x220.int.ebiederm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Al Viro , Omar Sandoval , linux-fsdevel@vger.kernel.org To: "Eric W. Biederman" Return-path: Received: from mail-wi0-f175.google.com ([209.85.212.175]:38810 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932133AbbFFUId (ORCPT ); Sat, 6 Jun 2015 16:08:33 -0400 Received: by wibdq8 with SMTP id dq8so48189915wib.1 for ; Sat, 06 Jun 2015 13:08:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87pp58wsbn.fsf@x220.int.ebiederm.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Jun 06, 2015 at 02:27:24PM -0500, Eric W. Biederman wrote: > Ivan Delalande writes: >=20 > > 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 ma= king > >> the root dentry of that sucker a contention point and adding to ha= sh > >> pollution... It's probably not going to cause visible problems, b= ut > >> 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? >=20 > Massive difference in perspective for the most part. It did cause me= to > step back and really look at what that code is doing and why. >=20 > For the immediate problem the issue is that the WARN_ON is warning ab= out > something nothing in the kernel has done for 5 years and in practice = as > you have seen is actually wrong. So deleting the warning message > appears the best way to handle the situation you are seeing. Ok, great. Thanks for all the info and the new patch, Eric. --=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