diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-09-26 21:26:50 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-09-26 21:26:50 -0400 |
commit | 8527dd7187a05f2548010accdfad9dad892acf47 (patch) | |
tree | 46addad1d4bba3057de7eeb7fd01fa55ac87bcfc | |
parent | 5cc3821b576964513f5532e0ac1efeb52f62ec6c (diff) |
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>
-rw-r--r-- | fs/dcache.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 36d84ec31d8a..22107630fc03 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -2804,12 +2804,8 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode) | |||
2804 | actual = __d_instantiate_unique(dentry, inode); | 2804 | actual = __d_instantiate_unique(dentry, inode); |
2805 | if (!actual) | 2805 | if (!actual) |
2806 | actual = dentry; | 2806 | actual = dentry; |
2807 | else | ||
2808 | BUG_ON(!d_unhashed(actual)); | ||
2809 | 2807 | ||
2810 | spin_lock(&actual->d_lock); | 2808 | d_rehash(actual); |
2811 | _d_rehash(actual); | ||
2812 | spin_unlock(&actual->d_lock); | ||
2813 | found: | 2809 | found: |
2814 | spin_unlock(&inode->i_lock); | 2810 | spin_unlock(&inode->i_lock); |
2815 | out_nolock: | 2811 | out_nolock: |