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

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

diff -u --recursive --new-file v2.3.99-pre3/linux/fs/autofs4/root.c linux/fs/autofs4/root.c
@@ -181,7 +181,7 @@
 	/* If this is an unused 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 && 
+	    !d_mountpoint(dentry) && 
 	    list_empty(&dentry->d_subdirs)) {
 		DPRINTK(("try_to_fill_entry: mounting existing dir\n"));
 		return autofs4_wait(sbi, &dentry->d_name, NFY_MOUNT) == 0;
@@ -226,7 +226,7 @@
 
 	/* Check for a non-mountpoint directory with no contents */
 	if (S_ISDIR(dentry->d_inode->i_mode) &&
-	    dentry->d_mounts == dentry && 
+	    !d_mountpoint(dentry) && 
 	    list_empty(&dentry->d_subdirs)) {
 		DPRINTK(("autofs_root_revalidate: dentry=%p %.*s, emptydir\n",
 			 dentry, dentry->d_name.len, dentry->d_name.name));

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