s390/dasd: process all requests in the device tasklet
authorHannes Reinecke <hare@suse.de>
Wed, 30 Jan 2013 09:26:13 +0000 (09:26 +0000)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 1 Jul 2013 15:31:18 +0000 (17:31 +0200)
Originally the DASD device tasklet would process the entries on
the ccw_queue until the first non-final request was found.
Which was okay as long as all requests have the same retries and
expires parameter.
However, as we're now allowing to modify both it is possible to
have requests _after_ the first request which already have expired.
So we need to check all requests in the device tasklet.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c

index 498548980d78967514866b624ce269290c97a030..000e5140bda4d54051e9669e7a2a9dc88769d107 100644 (file)
@@ -1787,11 +1787,11 @@ static void __dasd_device_process_ccw_queue(struct dasd_device *device,
        list_for_each_safe(l, n, &device->ccw_queue) {
                cqr = list_entry(l, struct dasd_ccw_req, devlist);
 
-               /* Stop list processing at the first non-final request. */
+               /* Skip any non-final request. */
                if (cqr->status == DASD_CQR_QUEUED ||
                    cqr->status == DASD_CQR_IN_IO ||
                    cqr->status == DASD_CQR_CLEAR_PENDING)
-                       break;
+                       continue;
                if (cqr->status == DASD_CQR_ERROR) {
                        __dasd_device_recovery(device, cqr);
                }