patch-2.1.63 linux/fs/nfs/dir.c
Next file: linux/include/asm-i386/bugs.h
Previous file: linux/fs/ncpfs/sock.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
Sat Nov 8 11:33:05 1997
- Orig file:
v2.1.62/linux/fs/nfs/dir.c
- Orig date:
Mon Nov 3 13:04:27 1997
diff -u --recursive --new-file v2.1.62/linux/fs/nfs/dir.c linux/fs/nfs/dir.c
@@ -31,9 +31,13 @@
#define NFS_MAX_AGE 10*HZ /* max age for dentry validation */
+#ifndef shrink_dcache_parent
+#define shrink_dcache_parent(dentry) shrink_dcache_sb((dentry)->d_sb)
+#endif
+
/* needed by smbfs as well ... move to dcache? */
extern void nfs_renew_times(struct dentry *);
-extern void nfs_invalidate_dircache_sb(struct super_block *);
+
#define NFS_PARANOIA 1
/*
@@ -626,7 +630,7 @@
error = -EBUSY;
if (dentry->d_count > 1) {
/* Attempt to shrink child dentries ... */
- shrink_dcache_sb(dentry->d_sb); /* Arghhh */
+ shrink_dcache_parent(dentry);
if (dentry->d_count > 1)
goto out;
}
@@ -811,6 +815,14 @@
}
error = nfs_proc_remove(NFS_SERVER(dir),
NFS_FH(dir), dentry->d_name.name);
+#ifdef NFS_PARANOIA
+if (dentry->d_count > 1)
+printk("nfs_safe_remove: %s/%s busy after delete?? d_count=%d\n",
+dentry->d_parent->d_name.name, dentry->d_name.name, dentry->d_count);
+if (inode && inode->i_count > 1)
+printk("nfs_safe_remove: %s/%s inode busy?? i_count=%d\n",
+dentry->d_parent->d_name.name, dentry->d_name.name, inode->i_count);
+#endif
if (!error) {
nfs_invalidate_dircache(dir);
if (inode && inode->i_nlink)
@@ -1005,7 +1017,7 @@
* Moving a directory ... prune child dentries if needed.
*/
else if (old_dentry->d_count > 1)
- shrink_dcache_sb(old_dentry->d_sb); /* Arghhh */
+ shrink_dcache_parent(old_dentry);
/*
* Now check the use counts ... we can't safely do the
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov