From: Al Viro Date: Sun, 24 Jul 2016 20:36:04 +0000 (-0400) Subject: Merge branch 'test.d_iput' into work.misc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17648b871d3cecf310f55ce8c6ce5821d135f6ec;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'test.d_iput' into work.misc --- 17648b871d3cecf310f55ce8c6ce5821d135f6ec diff --cc fs/dcache.c index 484a52db99ba,fe7cde2f2fe5..d5beef01cdfc --- a/fs/dcache.c +++ b/fs/dcache.c @@@ -569,15 -509,18 +546,13 @@@ static void __dentry_kill(struct dentr } /* if it was on the hash then remove it */ __d_drop(dentry); - __list_del_entry(&dentry->d_child); - /* - * Inform d_walk() that we are no longer attached to the - * dentry tree - */ - dentry->d_flags |= DCACHE_DENTRY_KILLED; + dentry_unlist(dentry, parent); if (parent) spin_unlock(&parent->d_lock); - dentry_iput(dentry); - /* - * dentry_iput drops the locks, at which point nobody (except - * transient RCU lookups) can reach this dentry. - */ - BUG_ON(dentry->d_lockref.count > 0); + if (dentry->d_inode) + dentry_unlink_inode(dentry); + else + spin_unlock(&dentry->d_lock); this_cpu_dec(nr_dentry); if (dentry->d_op && dentry->d_op->d_release) dentry->d_op->d_release(dentry);