pvcalls-front.c (64d6871827b1e2ac8c9daf49f2c883378c7d50cd) pvcalls-front.c (d1a75e0896f5e9f5cb6a979caaea39f1f4b9feb1)
1/*
2 * (c) 2017 Stefano Stabellini <stefano@aporeto.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 1004 unchanged lines hidden (view full) ---

1013 * easiest way to guarantee this is to see that no pvcalls
1014 * (other than us) is in progress on this socket.
1015 */
1016 while (atomic_read(&map->refcount) > 1)
1017 cpu_relax();
1018
1019 pvcalls_front_free_map(bedata, map);
1020 } else {
1/*
2 * (c) 2017 Stefano Stabellini <stefano@aporeto.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 1004 unchanged lines hidden (view full) ---

1013 * easiest way to guarantee this is to see that no pvcalls
1014 * (other than us) is in progress on this socket.
1015 */
1016 while (atomic_read(&map->refcount) > 1)
1017 cpu_relax();
1018
1019 pvcalls_front_free_map(bedata, map);
1020 } else {
1021 wake_up(&bedata->inflight_req);
1022 wake_up(&map->passive.inflight_accept_req);
1023
1024 while (atomic_read(&map->refcount) > 1)
1025 cpu_relax();
1026
1021 spin_lock(&bedata->socket_lock);
1022 list_del(&map->list);
1023 spin_unlock(&bedata->socket_lock);
1024 if (READ_ONCE(map->passive.inflight_req_id) !=
1025 PVCALLS_INVALID_ID) {
1026 pvcalls_front_free_map(bedata,
1027 map->passive.accept_map);
1028 }

--- 219 unchanged lines hidden ---
1027 spin_lock(&bedata->socket_lock);
1028 list_del(&map->list);
1029 spin_unlock(&bedata->socket_lock);
1030 if (READ_ONCE(map->passive.inflight_req_id) !=
1031 PVCALLS_INVALID_ID) {
1032 pvcalls_front_free_map(bedata,
1033 map->passive.accept_map);
1034 }

--- 219 unchanged lines hidden ---