pvcalls-front: introduce a per sock_mapping refcount
authorStefano Stabellini <sstabellini@kernel.org>
Wed, 14 Feb 2018 18:28:23 +0000 (10:28 -0800)
committerJuergen Gross <jgross@suse.com>
Sat, 17 Feb 2018 08:40:58 +0000 (09:40 +0100)
commit64d6871827b1e2ac8c9daf49f2c883378c7d50cd
tree344bc0cf903eb3b9d73d09cdaadc1018e2db9a2c
parent63e708f826bb21470155d37b103a75d8a9e25b18
pvcalls-front: introduce a per sock_mapping refcount

Introduce a per sock_mapping refcount, in addition to the existing
global refcount. Thanks to the sock_mapping refcount, we can safely wait
for it to be 1 in pvcalls_front_release before freeing an active socket,
instead of waiting for the global refcount to be 1.

Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
Acked-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/pvcalls-front.c