Loading fs/dcache.c +7 −39 Original line number Diff line number Diff line Loading @@ -1888,15 +1888,11 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode, * if not go ahead and create it now. */ found = d_hash_and_lookup(dentry->d_parent, name); if (unlikely(IS_ERR(found))) goto err_out; if (!found) { new = d_alloc(dentry->d_parent, name); if (!new) { found = ERR_PTR(-ENOMEM); goto err_out; } } else { found = d_splice_alias(inode, new); if (found) { dput(new); Loading @@ -1904,38 +1900,10 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode, } return new; } /* * If a matching dentry exists, and it's not negative use it. * * Decrement the reference count to balance the iget() done * earlier on. */ if (found->d_inode) { if (unlikely(found->d_inode != inode)) { /* This can't happen because bad inodes are unhashed. */ BUG_ON(!is_bad_inode(inode)); BUG_ON(!is_bad_inode(found->d_inode)); } iput(inode); return found; } /* * Negative dentry: instantiate it unless the inode is a directory and * already has a dentry. */ new = d_splice_alias(inode, found); if (new) { dput(found); found = new; } return found; err_out: iput(inode); return found; } EXPORT_SYMBOL(d_add_ci); /* Loading Loading
fs/dcache.c +7 −39 Original line number Diff line number Diff line Loading @@ -1888,15 +1888,11 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode, * if not go ahead and create it now. */ found = d_hash_and_lookup(dentry->d_parent, name); if (unlikely(IS_ERR(found))) goto err_out; if (!found) { new = d_alloc(dentry->d_parent, name); if (!new) { found = ERR_PTR(-ENOMEM); goto err_out; } } else { found = d_splice_alias(inode, new); if (found) { dput(new); Loading @@ -1904,38 +1900,10 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode, } return new; } /* * If a matching dentry exists, and it's not negative use it. * * Decrement the reference count to balance the iget() done * earlier on. */ if (found->d_inode) { if (unlikely(found->d_inode != inode)) { /* This can't happen because bad inodes are unhashed. */ BUG_ON(!is_bad_inode(inode)); BUG_ON(!is_bad_inode(found->d_inode)); } iput(inode); return found; } /* * Negative dentry: instantiate it unless the inode is a directory and * already has a dentry. */ new = d_splice_alias(inode, found); if (new) { dput(found); found = new; } return found; err_out: iput(inode); return found; } EXPORT_SYMBOL(d_add_ci); /* Loading