WTF is d_add_ci() doing with negative dentries?

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

 



	AFAICS, if d_add_ci() ever finds a negative hashed dentry for
exact name, it's already buggered.  Because right *before* that
d_add_ci() lookup for exact name would've turned valid negative.
IOW, the whole thing ought to be
        found = d_hash_and_lookup(dentry->d_parent, name);
	if (found) {
		iput(inode);
		return found;
	}
	new = d_alloc(dentry->d_parent, name);
	if (!new) {
		iput(inode);
		return ERR_PTR(-ENOMEM);
	}
	found = d_splice_alias(inode, new);
	if (found) {
		dput(new);
		return found;
	}
	return new;
Moreover, it might very well be better to pass dentry->d_parent instead
of dentry...  Objections?
--
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