]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
authorDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2014 01:02:51 +0000 (20:02 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2014 01:02:51 +0000 (20:02 -0500)
More work from Al Viro to move away from modifying iovecs
by using iov_iter instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
net/tipc/socket.c

diff --combined net/tipc/socket.c
index 6aa8c6a1ab10c105610c07a87b4e246cbc0790a8,b3415a78da2e6e1de1df88277670cce2aaa60264..341fbd1b5f74f2e5d3ed9b312f3b9fbd69f00235
@@@ -700,7 -700,7 +700,7 @@@ static unsigned int tipc_poll(struct fi
   * tipc_sendmcast - send multicast message
   * @sock: socket structure
   * @seq: destination address
-  * @iov: message data to send
+  * @msg: message to send
   * @dsz: total length of message data
   * @timeo: timeout to wait for wakeup
   *
   * Returns the number of bytes sent on success, or errno
   */
  static int tipc_sendmcast(struct  socket *sock, struct tipc_name_seq *seq,
-                         struct iovec *iov, size_t dsz, long timeo)
+                         struct msghdr *msg, size_t dsz, long timeo)
  {
        struct sock *sk = sock->sk;
        struct tipc_msg *mhdr = &tipc_sk(sk)->phdr;
  
  new_mtu:
        mtu = tipc_bclink_get_mtu();
-       rc = tipc_msg_build(mhdr, iov, 0, dsz, mtu, &buf);
+       rc = tipc_msg_build(mhdr, msg, 0, dsz, mtu, &buf);
        if (unlikely(rc < 0))
                return rc;
  
@@@ -905,7 -905,6 +905,6 @@@ static int tipc_sendmsg(struct kiocb *i
        struct sock *sk = sock->sk;
        struct tipc_sock *tsk = tipc_sk(sk);
        struct tipc_msg *mhdr = &tsk->phdr;
-       struct iovec *iov = m->msg_iov;
        u32 dnode, dport;
        struct sk_buff *buf;
        struct tipc_name_seq *seq = &dest->addr.nameseq;
        timeo = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT);
  
        if (dest->addrtype == TIPC_ADDR_MCAST) {
-               rc = tipc_sendmcast(sock, seq, iov, dsz, timeo);
+               rc = tipc_sendmcast(sock, seq, m, dsz, timeo);
                goto exit;
        } else if (dest->addrtype == TIPC_ADDR_NAME) {
                u32 type = dest->addr.name.name.type;
  
  new_mtu:
        mtu = tipc_node_get_mtu(dnode, tsk->ref);
-       rc = tipc_msg_build(mhdr, iov, 0, dsz, mtu, &buf);
+       rc = tipc_msg_build(mhdr, m, 0, dsz, mtu, &buf);
        if (rc < 0)
                goto exit;
  
@@@ -1094,7 -1093,7 +1093,7 @@@ static int tipc_send_stream(struct kioc
  next:
        mtu = tsk->max_pkt;
        send = min_t(uint, dsz - sent, TIPC_MAX_USER_MSG_SIZE);
-       rc = tipc_msg_build(mhdr, m->msg_iov, sent, send, mtu, &buf);
+       rc = tipc_msg_build(mhdr, m, sent, send, mtu, &buf);
        if (unlikely(rc < 0))
                goto exit;
        do {
@@@ -2811,7 -2810,7 +2810,7 @@@ void tipc_socket_stop(void
  }
  
  /* Caller should hold socket lock for the passed tipc socket. */
 -int __tipc_nl_add_sk_con(struct sk_buff *skb, struct tipc_sock *tsk)
 +static int __tipc_nl_add_sk_con(struct sk_buff *skb, struct tipc_sock *tsk)
  {
        u32 peer_node;
        u32 peer_port;
@@@ -2846,8 -2845,8 +2845,8 @@@ msg_full
  }
  
  /* Caller should hold socket lock for the passed tipc socket. */
 -int __tipc_nl_add_sk(struct sk_buff *skb, struct netlink_callback *cb,
 -                   struct tipc_sock *tsk)
 +static int __tipc_nl_add_sk(struct sk_buff *skb, struct netlink_callback *cb,
 +                          struct tipc_sock *tsk)
  {
        int err;
        void *hdr;
@@@ -2912,9 -2911,8 +2911,9 @@@ int tipc_nl_sk_dump(struct sk_buff *skb
  }
  
  /* Caller should hold socket lock for the passed tipc socket. */
 -int __tipc_nl_add_sk_publ(struct sk_buff *skb, struct netlink_callback *cb,
 -                        struct publication *publ)
 +static int __tipc_nl_add_sk_publ(struct sk_buff *skb,
 +                               struct netlink_callback *cb,
 +                               struct publication *publ)
  {
        void *hdr;
        struct nlattr *attrs;
@@@ -2951,9 -2949,8 +2950,9 @@@ msg_cancel
  }
  
  /* Caller should hold socket lock for the passed tipc socket. */
 -int __tipc_nl_list_sk_publ(struct sk_buff *skb, struct netlink_callback *cb,
 -                         struct tipc_sock *tsk, u32 *last_publ)
 +static int __tipc_nl_list_sk_publ(struct sk_buff *skb,
 +                                struct netlink_callback *cb,
 +                                struct tipc_sock *tsk, u32 *last_publ)
  {
        int err;
        struct publication *p;