From: Andrew Morton <[email-masked]>

Cc: Kirill Korotaev <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 fs/dcache.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -puN fs/dcache.c~fix-of-dcache-race-leading-to-busy-inodes-on-umount-fix fs/dcache.c
--- 25/fs/dcache.c~fix-of-dcache-race-leading-to-busy-inodes-on-umount-fix	2005-05-11 19:34:13.000000000 -0700
+++ 25-akpm/fs/dcache.c	2005-05-11 19:34:13.000000000 -0700
@@ -269,8 +269,12 @@ kill_it: {
 		/*drops the locks, at that point nobody can reach this dentry */
 		dentry_iput(dentry);
 		d_free(dentry);
-		if (dentry == parent)
+		if (unlikely(dentry == parent)) {
+			spin_lock(&dcache_lock);
+			dcache_shrinker_del(&lds);
+			spin_unlock(&dcache_lock);
 			return;
+		}
 		dentry = parent;
 		spin_lock(&dcache_lock);
 		dcache_shrinker_del(&lds);
_