summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-09-26 21:26:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-09-26 21:26:50 -0400
commit8527dd7187a05f2548010accdfad9dad892acf47 (patch)
tree46addad1d4bba3057de7eeb7fd01fa55ac87bcfc
parent5cc3821b576964513f5532e0ac1efeb52f62ec6c (diff)
downloadop-kernel-dev-8527dd7187a05f2548010accdfad9dad892acf47.zip
op-kernel-dev-8527dd7187a05f2548010accdfad9dad892acf47.tar.gz
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.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 36d84ec..2210763 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -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:
OpenPOWER on IntegriCloud