xen/netback: cleanup init and deinit code
authorJuergen Gross <jgross@suse.com>
Mon, 21 Oct 2019 05:30:52 +0000 (07:30 +0200)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 22 Oct 2019 16:52:04 +0000 (09:52 -0700)
commit2ac061ce97f413bfbbdd768f7d2e0fda2e8170df
tree80105c4b99633cddd6a359df05cc6ce496ca8b71
parent88238d2d225b2830706a941adbb5326b581eb6eb
xen/netback: cleanup init and deinit code

Do some cleanup of the netback init and deinit code:

- add an omnipotent queue deinit function usable from
  xenvif_disconnect_data() and the error path of xenvif_connect_data()
- only install the irq handlers after initializing all relevant items
  (especially the kthreads related to the queue)
- there is no need to use get_task_struct() after creating a kthread
  and using put_task_struct() again after having stopped it.
- use kthread_run() instead of kthread_create() to spare the call of
  wake_up_process().

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Paul Durrant <pdurrant@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/xen-netback/interface.c