Commit 8527dd7187a05f2548010accdfad9dad892acf47

Authored by Al Viro
1 parent 5cc3821b57

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>

Showing 1 changed file with 1 additions and 5 deletions Side-by-side Diff

... ... @@ -2804,12 +2804,8 @@
2804 2804 actual = __d_instantiate_unique(dentry, inode);
2805 2805 if (!actual)
2806 2806 actual = dentry;
2807   - else
2808   - BUG_ON(!d_unhashed(actual));
2809 2807  
2810   - spin_lock(&actual->d_lock);
2811   - _d_rehash(actual);
2812   - spin_unlock(&actual->d_lock);
  2808 + d_rehash(actual);
2813 2809 found:
2814 2810 spin_unlock(&inode->i_lock);
2815 2811 out_nolock: