From: Al Viro Date: Sat, 27 Sep 2014 01:26:50 +0000 (-0400) Subject: don't open-code d_rehash() in d_materialise_unique() X-Git-Tag: v4.9.8~5649^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8527dd7187a05f2548010accdfad9dad892acf47;p=platform%2Fkernel%2Flinux-rpi3.git don't open-code d_rehash() in d_materialise_unique() ... and get rid of duplicate BUG_ON() there Signed-off-by: Al Viro --- 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: