diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-26 02:02:51 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-26 02:02:51 +0100 |
commit | d3fc6b3fddd54c2220a075aefc4e5e5ca25cff34 (patch) | |
tree | 794bd9737e15ecc636e2e3ef4c060c8e24488ca3 /net/tipc/msg.c | |
parent | net: Hyper-V: Deletion of an unnecessary check before the function call "vfree" (diff) | |
parent | rds: switch rds_message_copy_from_user() to iov_iter (diff) | |
download | linux-d3fc6b3fddd54c2220a075aefc4e5e5ca25cff34.tar.xz linux-d3fc6b3fddd54c2220a075aefc4e5e5ca25cff34.zip |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
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>
Diffstat (limited to 'net/tipc/msg.c')
-rw-r--r-- | net/tipc/msg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c index ec18076e81ec..9155496b8a8a 100644 --- a/net/tipc/msg.c +++ b/net/tipc/msg.c @@ -162,14 +162,14 @@ err: /** * tipc_msg_build - create buffer chain containing specified header and data * @mhdr: Message header, to be prepended to data - * @iov: User data + * @m: User message * @offset: Posision in iov to start copying from * @dsz: Total length of user data * @pktmax: Max packet size that can be used * @chain: Buffer or chain of buffers to be returned to caller * Returns message data size or errno: -ENOMEM, -EFAULT */ -int tipc_msg_build(struct tipc_msg *mhdr, struct iovec const *iov, +int tipc_msg_build(struct tipc_msg *mhdr, struct msghdr *m, int offset, int dsz, int pktmax , struct sk_buff **chain) { int mhsz = msg_hdr_sz(mhdr); @@ -194,7 +194,7 @@ int tipc_msg_build(struct tipc_msg *mhdr, struct iovec const *iov, skb_copy_to_linear_data(buf, mhdr, mhsz); pktpos = buf->data + mhsz; TIPC_SKB_CB(buf)->chain_sz = 1; - if (!dsz || !memcpy_fromiovecend(pktpos, iov, offset, dsz)) + if (!dsz || !memcpy_fromiovecend(pktpos, m->msg_iov, offset, dsz)) return dsz; rc = -EFAULT; goto error; @@ -223,7 +223,7 @@ int tipc_msg_build(struct tipc_msg *mhdr, struct iovec const *iov, if (drem < pktrem) pktrem = drem; - if (memcpy_fromiovecend(pktpos, iov, offset, pktrem)) { + if (memcpy_fromiovecend(pktpos, m->msg_iov, offset, pktrem)) { rc = -EFAULT; goto error; } |