Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17613
b: refs/heads/master
c: e866cfa
h: refs/heads/master
i:
  17611: 41a4eea
v: v3
  • Loading branch information
Oleg Drokin authored and Linus Torvalds committed Jan 10, 2006
1 parent a0dda01 commit f33b35a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 632d6407afb58ef125bf7e82a2e8af27d0704b56
refs/heads/master: e866cfa939de7f52c154a9495eb5767f89abf453
7 changes: 6 additions & 1 deletion trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,10 +808,14 @@ void d_instantiate(struct dentry *entry, struct inode * inode)
*
* Fill in inode information in the entry. On success, it returns NULL.
* If an unhashed alias of "entry" already exists, then we return the
* aliased dentry instead.
* aliased dentry instead and drop one reference to inode.
*
* Note that in order to avoid conflicts with rename() etc, the caller
* had better be holding the parent directory semaphore.
*
* This also assumes that the inode count has been incremented
* (or otherwise set) by the caller to indicate that it is now
* in use by the dcache.
*/
struct dentry *d_instantiate_unique(struct dentry *entry, struct inode *inode)
{
Expand All @@ -838,6 +842,7 @@ struct dentry *d_instantiate_unique(struct dentry *entry, struct inode *inode)
dget_locked(alias);
spin_unlock(&dcache_lock);
BUG_ON(!d_unhashed(alias));
iput(inode);
return alias;
}
list_add(&entry->d_alias, &inode->i_dentry);
Expand Down

0 comments on commit f33b35a

Please sign in to comment.