summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorStefan Haberland <stefan.haberland@de.ibm.com>2014-07-18 14:24:20 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-07-22 09:26:23 +0200
commit8fa56aed12f1b0a2828da52280e2efbbf1163ad5 (patch)
treee628581e9d5096dc968543f18657df28cdad6f8d /drivers/s390/block
parent931a3dce819d2dedc731011c6fd7e6bb5aa188ef (diff)
downloadblackbird-op-linux-8fa56aed12f1b0a2828da52280e2efbbf1163ad5.tar.gz
blackbird-op-linux-8fa56aed12f1b0a2828da52280e2efbbf1163ad5.zip
dasd: fix list_del corruption during format
If I/O errors occur during format a kernel panic with a list_del corruption may occur. Stop error recovery procedure after an erp action was taken. 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')
-rw-r--r--drivers/s390/block/dasd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 9242d7cff9b5..925b056dc2b3 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2307,8 +2307,12 @@ retry:
rc = 0;
list_for_each_entry_safe(cqr, n, ccw_queue, blocklist) {
- if (__dasd_sleep_on_erp(cqr))
+ if (__dasd_sleep_on_erp(cqr)) {
+ if (!cqr->status == DASD_CQR_TERMINATED &&
+ !cqr->status == DASD_CQR_NEED_ERP)
+ break;
rc = 1;
+ }
}
if (rc)
goto retry;
OpenPOWER on IntegriCloud