diff options
author | Dan Williams <dan.j.williams@intel.com> | 2024-01-02 22:03:04 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2024-01-02 22:03:04 +0300 |
commit | 11c83932028714014e4259072bd230473d6db730 (patch) | |
tree | ba5de3af7a65a6a60ebb1f0a36328fd853130ecd /net/vmw_vsock | |
parent | 58f1e9d3a30438042fc9ed65b3dc56b2e5f7886a (diff) | |
parent | 185c1a489f873cb71520fc089401e02dbf302dcd (diff) | |
download | linux-11c83932028714014e4259072bd230473d6db730.tar.xz |
Merge branch 'for-6.8/cxl-cdat' into for-6.8/cxl
Pick up the CDAT parsing and QOS class infrastructure for v6.8.
Diffstat (limited to 'net/vmw_vsock')
-rw-r--r-- | net/vmw_vsock/virtio_transport_common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index f6dc896bf44c..6df246b53260 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -59,8 +59,7 @@ static bool virtio_transport_can_zcopy(const struct virtio_transport *t_ops, t_ops = virtio_transport_get_ops(info->vsk); if (t_ops->can_msgzerocopy) { - int pages_in_iov = iov_iter_npages(iov_iter, MAX_SKB_FRAGS); - int pages_to_send = min(pages_in_iov, MAX_SKB_FRAGS); + int pages_to_send = iov_iter_npages(iov_iter, MAX_SKB_FRAGS); /* +1 is for packet header. */ return t_ops->can_msgzerocopy(pages_to_send + 1); @@ -844,7 +843,7 @@ static s64 virtio_transport_has_space(struct vsock_sock *vsk) struct virtio_vsock_sock *vvs = vsk->trans; s64 bytes; - bytes = vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt); + bytes = (s64)vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt); if (bytes < 0) bytes = 0; |