mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
don't open-code d_rehash() in d_materialise_unique()
... and get rid of duplicate BUG_ON() there Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5cc3821b57
commit
8527dd7187
1 changed files with 1 additions and 5 deletions
|
@ -2804,12 +2804,8 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode)
|
|||
actual = __d_instantiate_unique(dentry, inode);
|
||||
if (!actual)
|
||||
actual = dentry;
|
||||
else
|
||||
BUG_ON(!d_unhashed(actual));
|
||||
|
||||
spin_lock(&actual->d_lock);
|
||||
_d_rehash(actual);
|
||||
spin_unlock(&actual->d_lock);
|
||||
d_rehash(actual);
|
||||
found:
|
||||
spin_unlock(&inode->i_lock);
|
||||
out_nolock:
|
||||
|
|
Loading…
Reference in a new issue