Skip to content

Commit 8527dd7

Browse files
author
Al Viro
committed
don't open-code d_rehash() in d_materialise_unique()
... and get rid of duplicate BUG_ON() there Signed-off-by: Al Viro <[email protected]>
1 parent 5cc3821 commit 8527dd7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

fs/dcache.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,12 +2804,8 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode)
28042804
actual = __d_instantiate_unique(dentry, inode);
28052805
if (!actual)
28062806
actual = dentry;
2807-
else
2808-
BUG_ON(!d_unhashed(actual));
28092807

2810-
spin_lock(&actual->d_lock);
2811-
_d_rehash(actual);
2812-
spin_unlock(&actual->d_lock);
2808+
d_rehash(actual);
28132809
found:
28142810
spin_unlock(&inode->i_lock);
28152811
out_nolock:

0 commit comments

Comments
 (0)