aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-03-02 02:37:48 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-02 13:06:31 -0500
commit1b784140474e4fc94281a49e96c67d29df0efbde (patch)
tree569e9813ae7ab79616849b117c6b50b3d6e4dabb /drivers/vhost
parent39a0295f901423e260a034ac7c3211ecaa9c2745 (diff)
net: Remove iocb argument from sendmsg and recvmsg
After TIPC doesn't depend on iocb argument in its internal implementations of sendmsg() and recvmsg() hooks defined in proto structure, no any user is using iocb argument in them at all now. Then we can drop the redundant iocb argument completely from kinds of implementations of both sendmsg() and recvmsg() in the entire networking stack. Cc: Christoph Hellwig <hch@lst.de> Suggested-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index afa06d28725d..633012cc9a57 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -390,7 +390,7 @@ static void handle_tx(struct vhost_net *net)
390 ubufs = NULL; 390 ubufs = NULL;
391 } 391 }
392 /* TODO: Check specific error and bomb out unless ENOBUFS? */ 392 /* TODO: Check specific error and bomb out unless ENOBUFS? */
393 err = sock->ops->sendmsg(NULL, sock, &msg, len); 393 err = sock->ops->sendmsg(sock, &msg, len);
394 if (unlikely(err < 0)) { 394 if (unlikely(err < 0)) {
395 if (zcopy_used) { 395 if (zcopy_used) {
396 vhost_net_ubuf_put(ubufs); 396 vhost_net_ubuf_put(ubufs);
@@ -566,7 +566,7 @@ static void handle_rx(struct vhost_net *net)
566 /* On overrun, truncate and discard */ 566 /* On overrun, truncate and discard */
567 if (unlikely(headcount > UIO_MAXIOV)) { 567 if (unlikely(headcount > UIO_MAXIOV)) {
568 iov_iter_init(&msg.msg_iter, READ, vq->iov, 1, 1); 568 iov_iter_init(&msg.msg_iter, READ, vq->iov, 1, 1);
569 err = sock->ops->recvmsg(NULL, sock, &msg, 569 err = sock->ops->recvmsg(sock, &msg,
570 1, MSG_DONTWAIT | MSG_TRUNC); 570 1, MSG_DONTWAIT | MSG_TRUNC);
571 pr_debug("Discarded rx packet: len %zd\n", sock_len); 571 pr_debug("Discarded rx packet: len %zd\n", sock_len);
572 continue; 572 continue;
@@ -597,7 +597,7 @@ static void handle_rx(struct vhost_net *net)
597 */ 597 */
598 iov_iter_advance(&fixup, sizeof(hdr)); 598 iov_iter_advance(&fixup, sizeof(hdr));
599 } 599 }
600 err = sock->ops->recvmsg(NULL, sock, &msg, 600 err = sock->ops->recvmsg(sock, &msg,
601 sock_len, MSG_DONTWAIT | MSG_TRUNC); 601 sock_len, MSG_DONTWAIT | MSG_TRUNC);
602 /* Userspace might have consumed the packet meanwhile: 602 /* Userspace might have consumed the packet meanwhile:
603 * it's not supposed to do this usually, but might be hard 603 * it's not supposed to do this usually, but might be hard