The commit is pushed to "branch-rh7-3.10.0-1160.21.1.vz7.174.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.21.1.vz7.174.10
------>
commit 7633fe38d3998526a3f49fe411c090e0df351dd1
Author: Stefano Garzarella <sgarz...@redhat.com>
Date:   Wed Apr 21 17:51:56 2021 +0300

    ms/vsock: remove vm_sockets_get_local_cid()
    
    vm_sockets_get_local_cid() is only used in virtio_transport_common.c.
    We can replace it calling the virtio_transport_get_ops() and
    using the get_local_cid() callback registered by the transport.
    
    Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
    Reviewed-by: Jorgen Hansen <jhan...@vmware.com>
    Signed-off-by: Stefano Garzarella <sgarz...@redhat.com>
    Signed-off-by: David S. Miller <da...@davemloft.net>
    
    https://jira.sw.ru/browse/PSBM-128702
    (cherry picked from commit db205c766862edae48d64e69e2f2502e2a3e9135)
    Signed-off-by: Konstantin Khorenko <khore...@virtuozzo.com>
---
 include/linux/vm_sockets.h              |  2 --
 net/vmw_vsock/af_vsock.c                | 10 ----------
 net/vmw_vsock/virtio_transport_common.c |  2 +-
 3 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/include/linux/vm_sockets.h b/include/linux/vm_sockets.h
index 0805eec..f8ad38e 100644
--- a/include/linux/vm_sockets.h
+++ b/include/linux/vm_sockets.h
@@ -18,6 +18,4 @@
 
 #include <uapi/linux/vm_sockets.h>
 
-int vm_sockets_get_local_cid(void);
-
 #endif /* _VM_SOCKETS_H */
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 1a57667..82dd645 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -135,16 +135,6 @@ static struct proto vsock_proto = {
 static const struct vsock_transport *transport;
 static DEFINE_MUTEX(vsock_register_mutex);
 
-/**** EXPORTS ****/
-
-/* Get the ID of the local context.  This is transport dependent. */
-
-int vm_sockets_get_local_cid(void)
-{
-       return transport->get_local_cid();
-}
-EXPORT_SYMBOL_GPL(vm_sockets_get_local_cid);
-
 /**** UTILS ****/
 
 /* Each bound VSocket is stored in the bind hash table and each connected
diff --git a/net/vmw_vsock/virtio_transport_common.c 
b/net/vmw_vsock/virtio_transport_common.c
index 7872374..4313f0c 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -164,7 +164,7 @@ static int virtio_transport_send_pkt_info(struct vsock_sock 
*vsk,
        struct virtio_vsock_pkt *pkt;
        u32 pkt_len = info->pkt_len;
 
-       src_cid = vm_sockets_get_local_cid();
+       src_cid = virtio_transport_get_ops()->transport.get_local_cid();
        src_port = vsk->local_addr.svm_port;
        if (!info->remote_cid) {
                dst_cid = vsk->remote_addr.svm_cid;
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to