Re: [PATCH] vfs: Fix, simpliy and stop using d_dname for the /proc/*/ns/* files.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ivan Delalande <colona@xxxxxxxxxx> writes:

> 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 = d_alloc_pseudo(mnt->mnt_sb, &qname);
>> > +	dentry = 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);
>> 
>> Careful - that might have non-trivial effects.  Namely, you are making
>> 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.
>> 
>> 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’s concerns?

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.

For the immediate problem the issue is that the WARN_ON is warning about
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.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux