patch-1.3.73 linux/fs/ncpfs/dir.c

Next file: linux/fs/ncpfs/sock.c
Previous file: linux/fs/msdos/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.72/linux/fs/ncpfs/dir.c linux/fs/ncpfs/dir.c
@@ -416,8 +416,8 @@
 						      info.volume_name,
 						      &(entry->i)) != 0)
 				{
-					printk("ncpfs: could not lookup vol "
-					       "%s\n", info.volume_name);
+					DPRINTK("ncpfs: could not lookup vol "
+						"%s\n", info.volume_name);
 					continue;
 				}
 
@@ -709,7 +709,13 @@
 	{
 		if (   (result->dir->finfo.i.DosDirNum == dir_info->DosDirNum)
 		    && (result->dir->finfo.i.volNumber == dir_info->volNumber)
-		    && (strcmp(result->finfo.i.entryName, name) == 0))
+		    && (strcmp(result->finfo.i.entryName, name) == 0)
+		    /* The root dir is never looked up using this
+		     * routine.  Without the following test a root
+		     * directory 'sys' in a volume named 'sys' could
+		     * never be looked up, because
+		     * server->root->dir==server->root. */
+		    && (result != &(server->root)))
 		{
                         return result;
 		}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this