patch-2.3.99-pre4 linux/fs/autofs/root.c

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

diff -u --recursive --new-file v2.3.99-pre3/linux/fs/autofs/root.c linux/fs/autofs/root.c
@@ -63,7 +63,7 @@
 		/* fall through */
 	default:
 		while ( onr = nr, ent = autofs_hash_enum(dirhash,&nr,ent) ) {
-			if ( !ent->dentry || ent->dentry->d_mounts != ent->dentry ) {
+			if ( !ent->dentry || d_mountpoint(ent->dentry) ) {
 				if (filldir(dirent,ent->name,ent->len,onr,ent->ino) < 0)
 					return 0;
 				filp->f_pos = nr;
@@ -117,7 +117,7 @@
 
 	/* If this is a directory that isn't a mount point, bitch at the
 	   daemon and fix it in user space */
-	if ( S_ISDIR(dentry->d_inode->i_mode) && dentry->d_mounts == dentry ) {
+	if ( S_ISDIR(dentry->d_inode->i_mode) && !d_mountpoint(dentry) ) {
 		return !autofs_wait(sbi, &dentry->d_name);
 	}
 
@@ -157,7 +157,7 @@
 		return (dentry->d_time - jiffies <= AUTOFS_NEGATIVE_TIMEOUT);
 		
 	/* Check for a non-mountpoint directory */
-	if ( S_ISDIR(dentry->d_inode->i_mode) && dentry->d_mounts == dentry ) {
+	if ( S_ISDIR(dentry->d_inode->i_mode) && !d_mountpoint(dentry) ) {
 		if (autofs_oz_mode(sbi))
 			return 1;
 		else

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)