it'll die soon enough - now that kvec-backed iov_iter works regardless
of set_fs(), both instances will become copy_from_iter() as soon as
we introduce ->msg_iter...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
unsigned long len, int nb);
int (*memcpy_fromiovec) (struct l2cap_chan *chan,
unsigned char *kdata,
- struct iovec *iov,
+ struct msghdr *msg,
int len);
};
static inline int l2cap_chan_no_memcpy_fromiovec(struct l2cap_chan *chan,
unsigned char *kdata,
- struct iovec *iov,
+ struct msghdr *msg,
int len)
{
/* Following is safe since for compiler definitions of kvec and
* iovec are identical, yielding the same in-core layout and alignment
*/
- struct kvec *vec = (struct kvec *)iov;
+ struct kvec *vec = (struct kvec *)msg->msg_iov;
while (len > 0) {
if (vec->iov_len) {
int sent = 0;
if (chan->ops->memcpy_fromiovec(chan, skb_put(skb, count),
- msg->msg_iov, count))
+ msg, count))
return -EFAULT;
sent += count;
*frag = tmp;
if (chan->ops->memcpy_fromiovec(chan, skb_put(*frag, count),
- msg->msg_iov, count))
+ msg, count))
return -EFAULT;
sent += count;
static int l2cap_sock_memcpy_fromiovec_cb(struct l2cap_chan *chan,
unsigned char *kdata,
- struct iovec *iov, int len)
+ struct msghdr *msg, int len)
{
- return memcpy_fromiovec(kdata, iov, len);
+ return memcpy_from_msg(kdata, msg, len);
}
static void l2cap_sock_ready_cb(struct l2cap_chan *chan)