patch-2.4.13 linux/fs/namei.c
Next file: linux/fs/namespace.c
Previous file: linux/fs/msdos/namei.c
Back to the patch index
Back to the overall index
-  Lines: 17
-  Date:
Wed Oct 17 14:46:29 2001
-  Orig file: 
v2.4.12/linux/fs/namei.c
-  Orig date: 
Thu Oct 11 08:02:26 2001
diff -u --recursive --new-file v2.4.12/linux/fs/namei.c linux/fs/namei.c
@@ -646,10 +646,14 @@
 static int __emul_lookup_dentry(const char *name, struct nameidata *nd)
 {
 	if (path_walk(name, nd))
-		return 0;
+		return 0;		/* something went wrong... */
 
-	if (!nd->dentry->d_inode) {
+	if (!nd->dentry->d_inode || S_ISDIR(nd->dentry->d_inode->i_mode)) {
 		struct nameidata nd_root;
+		/*
+		 * NAME was not found in alternate root or it's a directory.  Try to find
+		 * it in the normal root:
+		 */
 		nd_root.last_type = LAST_ROOT;
 		nd_root.flags = nd->flags;
 		read_lock(¤t->fs->lock);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)