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

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

diff -u --recursive --new-file v2.2.10/linux/fs/ncpfs/dir.c linux/fs/ncpfs/dir.c
@@ -19,7 +19,6 @@
 #include <linux/mm.h>
 #include <asm/uaccess.h>
 #include <asm/byteorder.h>
-#include <linux/errno.h>
 #include <linux/locks.h>
 
 #include <linux/ncp_fs.h>
@@ -351,6 +350,9 @@
 	struct ncpfs_inode_info finfo;
 	__u8 __name[dentry->d_name.len + 1];
         
+	if (!dentry->d_inode || !dir)
+		return 0;
+	
 	server = NCP_SERVER(dir);
 
 	if (!ncp_conn_valid(server))

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