patch-2.3.2 linux/fs/ncpfs/inode.c

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

diff -u --recursive --new-file v2.3.1/linux/fs/ncpfs/inode.c linux/fs/ncpfs/inode.c
@@ -346,26 +346,27 @@
 						   GFP_KERNEL);
 	if (server == NULL)
 		goto out_no_server;
+	memset(server, 0, sizeof(*server));
 	NCP_SBP(sb) = server;
 
 	server->ncp_filp = ncp_filp;
-	server->lock = 0;
-	init_waitqueue_head(&server->wait);
+/*	server->lock = 0;	*/
+	init_MUTEX(&server->sem);
 	server->packet = NULL;
-	server->buffer_size = 0;
-	server->conn_status = 0;
-	server->root_dentry = NULL;
-	server->root_setuped = 0;
+/*	server->buffer_size = 0;	*/
+/*	server->conn_status = 0;	*/
+/*	server->root_dentry = NULL;	*/
+/*	server->root_setuped = 0;	*/
 #ifdef CONFIG_NCPFS_PACKET_SIGNING
-	server->sign_wanted = 0;
-	server->sign_active = 0;
+/*	server->sign_wanted = 0;	*/
+/*	server->sign_active = 0;	*/
 #endif
 	server->auth.auth_type = NCP_AUTH_NONE;
-	server->auth.object_name_len = 0;
-	server->auth.object_name = NULL;
-	server->auth.object_type = 0;
-	server->priv.len = 0;
-	server->priv.data = NULL;
+/*	server->auth.object_name_len = 0;	*/
+/*	server->auth.object_name = NULL;	*/
+/*	server->auth.object_type = 0;		*/
+/*	server->priv.len = 0;			*/
+/*	server->priv.data = NULL;		*/
 
 	server->m = *data;
 	/* Althought anything producing this is buggy, it happens
@@ -687,7 +688,7 @@
 		if ((result = ncp_make_open(inode, O_RDWR)) < 0) {
 			return -EACCES;
 		}
-		ncp_write(NCP_SERVER(inode), NCP_FINFO(inode)->file_handle,
+		ncp_write_kernel(NCP_SERVER(inode), NCP_FINFO(inode)->file_handle,
 			  attr->ia_size, 0, "", &written);
 
 		/* According to ndir, the changes only take effect after

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