summaryrefslogtreecommitdiff
path: root/drivers/s390
diff options
context:
space:
mode:
authorStefan Haberland <sth@linux.ibm.com>2018-07-25 15:00:47 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-08-09 13:49:32 +0300
commit669f3765b755fd8739ab46ce3a9c6292ce8b3d2a (patch)
tree74b8bacd507ec35a619b77317ecfaaceb0fd131c /drivers/s390
parent7c6553d4db03350dad0110c3224194c19df76a8f (diff)
downloadlinux-669f3765b755fd8739ab46ce3a9c6292ce8b3d2a.tar.xz
s390/dasd: fix hanging offline processing due to canceled worker
During offline processing two worker threads are canceled without freeing the device reference which leads to a hanging offline process. Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com> Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd_eckd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 1e97378d4f60..4e7b55a14b1a 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -2038,8 +2038,11 @@ static int dasd_eckd_basic_to_ready(struct dasd_device *device)
static int dasd_eckd_online_to_ready(struct dasd_device *device)
{
- cancel_work_sync(&device->reload_device);
- cancel_work_sync(&device->kick_validate);
+ if (cancel_work_sync(&device->reload_device))
+ dasd_put_device(device);
+ if (cancel_work_sync(&device->kick_validate))
+ dasd_put_device(device);
+
return 0;
};