patch-2.1.54 linux/include/asm-mips/namei.h
Next file: linux/include/asm-ppc/floppy.h
Previous file: linux/include/asm-mips/floppy.h
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Sat Sep  6 10:04:16 1997
-  Orig file: 
v2.1.53/linux/include/asm-mips/namei.h
-  Orig date: 
Thu Sep  4 17:07:31 1997
diff -u --recursive --new-file v2.1.53/linux/include/asm-mips/namei.h linux/include/asm-mips/namei.h
@@ -25,7 +25,16 @@
 			
 	if (IS_ERR (base)) return base;
 	
-	return lookup_dentry (name, base, follow_link);
+	base = lookup_dentry (name, base, follow_link);
+
+	if (IS_ERR (base)) return base;
+
+	if (!base->d_inode) {
+		dput(base);
+		return ERR_PTR(-ENOENT);
+	}
+        
+        return base;
 }
 
 #ifdef CONFIG_BINFMT_IRIX
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov