From e5d9a6869ef6345a344f97d3d83d029f70bfd278 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 16 Feb 2019 16:50:16 +0000 Subject: [PATCH] scst_vdisk: Avoid that setting numa_node_id causes unloading scst_vdisk to hang This patch fixes a bug that was introduced by r7075 / bdb23b89 ("scst: performance improvements"). Reported-by: Marc Smith git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7927 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 56fd89639..228ae222b 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -7833,6 +7833,13 @@ static void vdev_check_node(struct scst_vdisk_dev **pvirt_dev, int orig_nodeid) } *v = *virt_dev; kfree(virt_dev); + /* + * Since the address of the virtual device changed, update all + * pointers in the virtual device that point to the virtual + * device itself. + */ + INIT_WORK(&virt_dev->vdev_inq_changed_work, + vdev_inq_changed_fn); *pvirt_dev = v; }