diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 5245d7e37a46..706ae0ac94c9 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -2277,6 +2277,15 @@ static int _dasd_sleep_on(struct dasd_ccw_req *maincqr, int interruptible) cqr->intrc = -ENOLINK; continue; } + /* + * Don't try to start requests if device is in + * offline processing, it might wait forever + */ + if (test_bit(DASD_FLAG_OFFLINE, &device->flags)) { + cqr->status = DASD_CQR_FAILED; + cqr->intrc = -ENODEV; + continue; + } /* * Don't try to start requests if device is stopped * except path verification requests