Skip to content

Commit 56c39fb

Browse files
author
Al Viro
committed
switch l2cap ->memcpy_fromiovec() to msghdr
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>
1 parent f4362a2 commit 56c39fb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

include/net/bluetooth/l2cap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ struct l2cap_ops {
608608
unsigned long len, int nb);
609609
int (*memcpy_fromiovec) (struct l2cap_chan *chan,
610610
unsigned char *kdata,
611-
struct iovec *iov,
611+
struct msghdr *msg,
612612
int len);
613613
};
614614

@@ -905,13 +905,13 @@ static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan)
905905

906906
static inline int l2cap_chan_no_memcpy_fromiovec(struct l2cap_chan *chan,
907907
unsigned char *kdata,
908-
struct iovec *iov,
908+
struct msghdr *msg,
909909
int len)
910910
{
911911
/* Following is safe since for compiler definitions of kvec and
912912
* iovec are identical, yielding the same in-core layout and alignment
913913
*/
914-
struct kvec *vec = (struct kvec *)iov;
914+
struct kvec *vec = (struct kvec *)msg->msg_iov;
915915

916916
while (len > 0) {
917917
if (vec->iov_len) {

net/bluetooth/l2cap_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,7 +2097,7 @@ static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan,
20972097
int sent = 0;
20982098

20992099
if (chan->ops->memcpy_fromiovec(chan, skb_put(skb, count),
2100-
msg->msg_iov, count))
2100+
msg, count))
21012101
return -EFAULT;
21022102

21032103
sent += count;
@@ -2118,7 +2118,7 @@ static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan,
21182118
*frag = tmp;
21192119

21202120
if (chan->ops->memcpy_fromiovec(chan, skb_put(*frag, count),
2121-
msg->msg_iov, count))
2121+
msg, count))
21222122
return -EFAULT;
21232123

21242124
sent += count;

net/bluetooth/l2cap_sock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,9 +1338,9 @@ static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
13381338

13391339
static int l2cap_sock_memcpy_fromiovec_cb(struct l2cap_chan *chan,
13401340
unsigned char *kdata,
1341-
struct iovec *iov, int len)
1341+
struct msghdr *msg, int len)
13421342
{
1343-
return memcpy_fromiovec(kdata, iov, len);
1343+
return memcpy_from_msg(kdata, msg, len);
13441344
}
13451345

13461346
static void l2cap_sock_ready_cb(struct l2cap_chan *chan)

0 commit comments

Comments
 (0)