diff -urNp 2.4.19rc3ac1/fs/namei.c 2.4.19rc3ac2/fs/namei.c --- 2.4.19rc3ac1/fs/namei.c Tue Jul 23 23:03:33 2002 +++ 2.4.19rc3ac2/fs/namei.c Tue Jul 23 23:10:57 2002 @@ -1377,14 +1377,18 @@ out: static void d_unhash(struct dentry *dentry) { dget(dentry); + spin_lock(&dcache_lock); switch (atomic_read(&dentry->d_count)) { default: + spin_unlock(&dcache_lock); shrink_dcache_parent(dentry); + spin_lock(&dcache_lock); if (atomic_read(&dentry->d_count) != 2) break; case 2: - d_drop(dentry); + list_del_init(&dentry->d_hash); } + spin_unlock(&dcache_lock); } int vfs_rmdir(struct inode *dir, struct dentry *dentry)