patch-1.3.68 linux/fs/ncpfs/file.c

Next file: linux/fs/ncpfs/inode.c
Previous file: linux/fs/ncpfs/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.67/linux/fs/ncpfs/file.c linux/fs/ncpfs/file.c
@@ -93,6 +93,10 @@
 		DPRINTK("ncp_file_read: inode = NULL\n");
 		return -EINVAL;
 	}
+	if (!ncp_conn_valid(NCP_SERVER(inode)))
+	{
+		return -EIO;
+	}
 
 	if (!S_ISREG(inode->i_mode))
 	{
@@ -171,6 +175,10 @@
 	{
 		DPRINTK("ncp_file_write: inode = NULL\n");
 		return -EINVAL;
+	}
+	if (!ncp_conn_valid(NCP_SERVER(inode)))
+	{
+		return -EIO;
 	}
 
 	if (!S_ISREG(inode->i_mode))

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