Merge to Fedora Core 2 kernel-2.6.8-1.521
[linux-2.6.git] / net / rxrpc / connection.c
index 11c703b..929b82f 100644 (file)
@@ -620,7 +620,6 @@ int rxrpc_conn_sendmsg(struct rxrpc_connection *conn,
                       struct rxrpc_message *msg)
 {
        struct msghdr msghdr;
-       mm_segment_t oldfs;
        int ret;
 
        _enter("%p{%d}", conn, ntohs(conn->addr.sin_port));
@@ -634,12 +633,6 @@ int rxrpc_conn_sendmsg(struct rxrpc_connection *conn,
        /* set up the message to be transmitted */
        msghdr.msg_name         = &conn->addr;
        msghdr.msg_namelen      = sizeof(conn->addr);
-       /*
-        * the following is safe, since for compiler definitions of kvec and
-        * iovec are identical, yielding the same in-core layout and alignment
-        */
-       msghdr.msg_iov          = (struct iovec *)msg->data;
-       msghdr.msg_iovlen       = msg->dcount;
        msghdr.msg_control      = NULL;
        msghdr.msg_controllen   = 0;
        msghdr.msg_flags        = MSG_CONFIRM | MSG_DONTWAIT;
@@ -651,15 +644,11 @@ int rxrpc_conn_sendmsg(struct rxrpc_connection *conn,
             htons(conn->addr.sin_port));
 
        /* send the message */
-       oldfs = get_fs();
-       set_fs(KERNEL_DS);
-       ret = sock_sendmsg(conn->trans->socket, &msghdr, msg->dsize);
-       set_fs(oldfs);
-
+       ret = kernel_sendmsg(conn->trans->socket, &msghdr,
+                            msg->data, msg->dcount, msg->dsize);
        if (ret < 0) {
                msg->state = RXRPC_MSG_ERROR;
-       }
-       else {
+       } else {
                msg->state = RXRPC_MSG_SENT;
                ret = 0;