]> git.baikalelectronics.ru Git - kernel.git/commit
s390/dasd: Simplify code in format logic
authorJan Höppner <hoeppner@linux.vnet.ibm.com>
Mon, 21 Sep 2015 15:32:11 +0000 (17:32 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 7 Mar 2016 12:11:58 +0000 (13:11 +0100)
commit8de7fb54a72f40d3483ed082af0b3b8725f20ab9
tree5c103a4fd91ff9cd2dba328b629e06e32d29024c
parent85c5b477c89828213195f7aed25d899184a79ffc
s390/dasd: Simplify code in format logic

Currently, dasd_format is calling the format logic of a DASD discipline
with PAV enabled. If that fails with an error code of -EAGAIN the value
of retries is decremented and the discipline function is called with PAV
turned off.

The loop is supposed to try this up to 255 times until success. However,
-EAGAIN can only occur once here and therefore the loop will never reach
the 255 retries.

So, replace the unnecessarily complicated loop logic and simply try again
without PAV enabled in case of an -EAGAIN error.

Signed-off-by: Jan Höppner <hoeppner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_ioctl.c