++ * Similar as d_instantiate() except that it drops the disconnected
++ * dentry if any.
++ */
++void iopen_d_instantiate(struct dentry *dentry, struct inode * inode)
++{
++ struct dentry *dis_dentry;
++
++ /* verify this dentry is really new */
++ assert(dentry->d_inode == NULL);
++ assert(list_empty(&dentry->d_alias));
++
++ spin_lock(&dcache_lock);
++ if (!inode || !test_opt(inode->i_sb, IOPEN) ||
++ list_empty(&inode->i_dentry))
++ goto do_instantiate;
++
++ /* a disconnected dentry has been added in our back,
++ * we have to drop this dentry, see bug 16362/15713*/
++ dis_dentry = list_entry(inode->i_dentry.next, struct dentry, d_alias);
++ spin_lock(&dis_dentry->d_lock);
++ assert(dis_dentry->d_alias.next == &inode->i_dentry);
++ assert(dis_dentry->d_alias.prev == &inode->i_dentry);
++ assert(dis_dentry->d_flags & DCACHE_DISCONNECTED);
++ __d_drop(dis_dentry);
++ list_del_init(&dis_dentry->d_alias);
++ spin_unlock(&dis_dentry->d_lock);
++
++do_instantiate:
++ if (inode)
++ list_add(&dentry->d_alias, &inode->i_dentry);
++ dentry->d_inode = inode;
++ spin_unlock(&dcache_lock);
++ security_d_instantiate(dentry, inode);
++}
++
++/*