]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] dasd: call cleanup_cqr with request_queue_lock
authorStefan Haberland <stefan.haberland@de.ibm.com>
Thu, 25 Dec 2008 12:38:54 +0000 (13:38 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Dec 2008 12:39:02 +0000 (13:39 +0100)
__dasd_cleanup_cqr should be called with request_queue_lock held and
__dasd_block_process_erp with queue_lock

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c

index 363bd1303d217aa4904ea088549e8f0bb9f23618..570ae59c1d5eb5aa0841c1ee661134d93922ea4c 100644 (file)
@@ -1898,15 +1898,19 @@ restart_cb:
                wait_event(dasd_flush_wq, (cqr->status < DASD_CQR_QUEUED));
                /* Process finished ERP request. */
                if (cqr->refers) {
+                       spin_lock_bh(&block->queue_lock);
                        __dasd_block_process_erp(block, cqr);
+                       spin_unlock_bh(&block->queue_lock);
                        /* restart list_for_xx loop since dasd_process_erp
                         * might remove multiple elements */
                        goto restart_cb;
                }
                /* call the callback function */
+               spin_lock_irq(&block->request_queue_lock);
                cqr->endclk = get_clock();
                list_del_init(&cqr->blocklist);
                __dasd_cleanup_cqr(cqr);
+               spin_unlock_irq(&block->request_queue_lock);
        }
        return rc;
 }