patch-2.1.93 linux/fs/autofs/root.c

Next file: linux/fs/coda/inode.c
Previous file: linux/fs/autofs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.92/linux/fs/autofs/root.c linux/fs/autofs/root.c
@@ -109,8 +109,7 @@
 	if ( !(ent = autofs_hash_lookup(&sbi->dirhash, &dentry->d_name)) ) {
 		do {
 			if ( status && dentry->d_inode ) {
-				printk("autofs: lookup failure on existing dentry, status = %d, name = %s\n", status, dentry->d_name.name);
-				printk("autofs: trying to recover, but prepare for Armageddon\n");
+				printk("autofs warning: lookup failure on existing dentry, status = %d, name = %s\n", status, dentry->d_name.name);
 				break;
 			}
 
@@ -146,7 +145,10 @@
 		return !autofs_wait(sbi, &dentry->d_name);
 	}
 
-	autofs_update_usage(&sbi->dirhash,ent);
+	/* We don't update the usages for the autofs daemon itself, this
+	   is necessary for recursive autofs mounts */
+	if ( !autofs_oz_mode(sbi) )
+		autofs_update_usage(&sbi->dirhash,ent);
 
 	dentry->d_flags &= ~DCACHE_AUTOFS_PENDING;
 	return 1;
@@ -188,8 +190,10 @@
 	}
 
 	/* Update the usage list */
-	ent = (struct autofs_dir_ent *) dentry->d_time;
-	autofs_update_usage(&sbi->dirhash,ent);
+	if ( !autofs_oz_mode(sbi) ) {
+		ent = (struct autofs_dir_ent *) dentry->d_time;
+		autofs_update_usage(&sbi->dirhash,ent);
+	}
 	return 1;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov