patch-2.1.15 linux/fs/nfs/rpcsock.c

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

diff -u --recursive --new-file v2.1.14/linux/fs/nfs/rpcsock.c linux/fs/nfs/rpcsock.c
@@ -116,10 +116,12 @@
 	msg.msg_name	= sap;
 	msg.msg_namelen = salen;
 	msg.msg_control = NULL;
+	msg.msg_controllen = 0;
+	msg.msg_flags = 0;
 
 	oldfs = get_fs();
 	set_fs(get_ds());
-	result = sock->ops->sendmsg(sock, &msg, len, 0, 0);
+	result = sock_sendmsg(sock, &msg, len);
 	set_fs(oldfs);
 
 	dprintk("RPC: rpc_sendmsg(iov %p, len %d) = %d\n", iov, len, result);
@@ -136,17 +138,19 @@
 	struct sockaddr	sa;
 	struct msghdr	msg;
 	unsigned long	oldfs;
-	int		result, alen;
+	int		result;
 
 	msg.msg_iov	= iov;
 	msg.msg_iovlen	= nr;
 	msg.msg_name	= &sa;
 	msg.msg_namelen = sizeof(sa);
 	msg.msg_control = NULL;
+	msg.msg_controllen = 0;
+	msg.msg_flags = 0;
 
 	oldfs = get_fs();
 	set_fs(get_ds());
-	result = sock->ops->recvmsg(sock, &msg, len, 1, flags, &alen);
+	result = sock_recvmsg(sock, &msg, len, flags|MSG_DONTWAIT);
 	set_fs(oldfs);
 
 	dprintk("RPC: rpc_recvmsg(iov %p, len %d) = %d\n", iov, len, result);
@@ -302,7 +306,7 @@
 rpc_send(struct rpc_sock *rsock, struct rpc_wait *slot)
 {
 	struct rpc_ioreq *req = slot->w_req;
-	struct iovec	iov[UIO_MAXIOV];
+	struct iovec	iov[UIO_FASTIOV];
 
 	if (rsock->shutdown)
 		return -EIO;
@@ -336,7 +340,7 @@
 {
 	struct rpc_wait	*rovr;
 	struct rpc_ioreq *req;
-	struct iovec	iov[UIO_MAXIOV];
+	struct iovec	iov[UIO_FASTIOV];
 	u32		xid;
 	int		safe, result;
 
@@ -537,7 +541,7 @@
 		printk(KERN_WARNING "RPC: only UDP sockets supported\n");
 		return NULL;
 	}
-	sk = (struct sock *) sock->data;
+	sk = sock->sk;
 
 	if ((rsock = kmalloc(sizeof(struct rpc_sock), GFP_KERNEL)) == NULL)
 		return NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov