The attached patch adds a call to shrink_dcache_parent() to the VFS
rmdir routine.
I noticed that the rmdir syscall doesn't include a test to verify that
the object to be deleted is actually a directory. Unless I've overlooked
something, it seems that this test should be added to the generic code
so that each fs doesn't have to include it.
Regards,
Bill
--------------2D2813241F9A0B25A73F2F95
Content-Type: text/plain; charset=us-ascii; name="namei_72-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="namei_72-patch"
--- fs/namei.c.old Wed Dec 10 00:12:14 1997
+++ fs/namei.c Wed Dec 10 15:50:59 1997
@@ -833,6 +833,9 @@
if (dir->d_inode->i_sb && dir->d_inode->i_sb->dq_op)
dir->d_inode->i_sb->dq_op->initialize(dir->d_inode, -1);
+ if (dentry->d_count > 1)
+ shrink_dcache_parent(dentry);
+
error = dir->d_inode->i_op->rmdir(dir->d_inode, dentry);
exit_lock:
--------------2D2813241F9A0B25A73F2F95--