summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorStefan Haberland <sth@linux.vnet.ibm.com>2018-02-19 12:24:39 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-02-27 08:05:28 +0100
commita1fc8181eb7858400d39bff42e9d31a2e8b80c83 (patch)
treeadcd24d5d95849fc00677a91730486fc11960c82 /drivers/s390/block
parent5e725c570eaa405eb5b1a557e7c6831ac56c3088 (diff)
downloadblackbird-op-linux-a1fc8181eb7858400d39bff42e9d31a2e8b80c83.tar.gz
blackbird-op-linux-a1fc8181eb7858400d39bff42e9d31a2e8b80c83.zip
s390/dasd: remove unneeded sanity check
Reported by smatch that the usage of cqr->block is inconsistent. The sanity check is not needed because _dasd_requeue_request already checks for a valid cqr->block pointer and all referenced ERP requests have a valid cqr->block pointer as well since it is copied during ERP process. Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com> Reviewed-by: Jan Hoeppner <hoeppner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index ecef8e73d40b..c89c26e40165 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -3918,8 +3918,13 @@ static int dasd_generic_requeue_all_requests(struct dasd_device *device)
cqr = refers;
}
- if (cqr->block)
- list_del_init(&cqr->blocklist);
+ /*
+ * _dasd_requeue_request already checked for a valid
+ * blockdevice, no need to check again
+ * all erp requests (cqr->refers) have a cqr->block
+ * pointer copy from the original cqr
+ */
+ list_del_init(&cqr->blocklist);
cqr->block->base->discipline->free_cp(
cqr, (struct request *) cqr->callback_data);
}
OpenPOWER on IntegriCloud