diff options
author | Len Brown <len.brown@intel.com> | 2012-04-07 05:48:59 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-04-07 05:48:59 +0400 |
commit | eeaab2d8af2cf1d36d7086f22e9de42d6dd2995c (patch) | |
tree | 369b9c91a6d808944f07d2290fec6f9fe2731904 /drivers/s390/block/dasd_eckd.c | |
parent | ee01e663373343c63e0e3d364d09f6155378dbcc (diff) | |
parent | aaef292acf3a78d9c0bb6fb72226077d286b45d7 (diff) | |
download | linux-eeaab2d8af2cf1d36d7086f22e9de42d6dd2995c.tar.xz |
Merge branches 'idle-fix' and 'misc' into release
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 2617b1ed4709..c21871a4e73d 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -1564,6 +1564,12 @@ static void dasd_eckd_do_validate_server(struct work_struct *work) static void dasd_eckd_kick_validate_server(struct dasd_device *device) { dasd_get_device(device); + /* exit if device not online or in offline processing */ + if (test_bit(DASD_FLAG_OFFLINE, &device->flags) || + device->state < DASD_STATE_ONLINE) { + dasd_put_device(device); + return; + } /* queue call to do_validate_server to the kernel event daemon. */ schedule_work(&device->kick_validate); } @@ -1993,6 +1999,7 @@ static int dasd_eckd_ready_to_online(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); return dasd_alias_remove_device(device); }; @@ -2263,6 +2270,7 @@ static void dasd_eckd_check_for_device_change(struct dasd_device *device, * and only if not suspended */ if (!device->block && private->lcu && + device->state == DASD_STATE_ONLINE && !test_bit(DASD_FLAG_OFFLINE, &device->flags) && !test_bit(DASD_FLAG_SUSPENDED, &device->flags)) { /* |