Commit 8527dd71 authored by Al Viro's avatar Al Viro

don't open-code d_rehash() in d_materialise_unique()

... and get rid of duplicate BUG_ON() there
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5cc3821b
...@@ -2804,12 +2804,8 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode) ...@@ -2804,12 +2804,8 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode)
actual = __d_instantiate_unique(dentry, inode); actual = __d_instantiate_unique(dentry, inode);
if (!actual) if (!actual)
actual = dentry; actual = dentry;
else
BUG_ON(!d_unhashed(actual));
spin_lock(&actual->d_lock); d_rehash(actual);
_d_rehash(actual);
spin_unlock(&actual->d_lock);
found: found:
spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock);
out_nolock: out_nolock:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment