summaryrefslogtreecommitdiff
path: root/drivers/s390/block/dasd_eckd.c
diff options
context:
space:
mode:
authorStefan Haberland <stefan.haberland@de.ibm.com>2015-04-02 13:27:25 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-04-15 13:23:50 +0300
commitf2608cd4a37479d11d0748f524a6a363ee38631f (patch)
treef21edcbfd05db92f54dea89f32e43c6e2e1dcdd0 /drivers/s390/block/dasd_eckd.c
parent8741ce6d114873e482b1ef298d6537d18ff393d3 (diff)
downloadlinux-f2608cd4a37479d11d0748f524a6a363ee38631f.tar.xz
s390/dasd: fix inability to set a DASD device offline
Fix ref counting for DASD devices leading to an inability to set a DASD device offline. Before a worker is scheduled the DASD device driver takes a reference to the device. If the worker was already scheduled this reference was never freed. Fix by giving the reference to the DASD device free when schedule_work() returns false. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r--drivers/s390/block/dasd_eckd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 49b48a887c66..6215f6455eb8 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -1628,7 +1628,8 @@ static void dasd_eckd_kick_validate_server(struct dasd_device *device)
return;
}
/* queue call to do_validate_server to the kernel event daemon. */
- schedule_work(&device->kick_validate);
+ if (!schedule_work(&device->kick_validate))
+ dasd_put_device(device);
}
static u32 get_fcx_max_data(struct dasd_device *device)