From: Al Viro Date: Sun, 24 Jul 2016 20:36:04 +0000 (-0400) Subject: Merge branch 'test.d_iput' into work.misc X-Git-Tag: v4.8-rc1~125^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17648b871d3cecf310f55ce8c6ce5821d135f6ec;p=platform%2Fkernel%2Flinux-exynos.git Merge branch 'test.d_iput' into work.misc --- 17648b871d3cecf310f55ce8c6ce5821d135f6ec diff --cc fs/dcache.c index 484a52d,fe7cde2..d5beef0 --- 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);