Commit a290156f authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky
Browse files

[S390] cio: fix init_count in case of recognition after steal lock

After we try to steal a lock on a ccw device in boxed state,
we have to restart device recognition and potentially reprobing.

In this case ccw_device_init_count was erroneously decreased
twice. This patch fixes the issue.
Signed-off-by: default avatarSebastian Ott <>
Signed-off-by: default avatarMartin Schwidefsky <>
parent 52898025
......@@ -764,7 +764,7 @@ static void sch_create_and_recog_new_device(struct subchannel *sch)
static void io_subchannel_register(struct ccw_device *cdev)
struct subchannel *sch;
int ret;
int ret, adjust_init_count = 1;
unsigned long flags;
sch = to_subchannel(cdev->dev.parent);
......@@ -793,6 +793,7 @@ static void io_subchannel_register(struct ccw_device *cdev)
adjust_init_count = 0;
goto out;
......@@ -818,7 +819,7 @@ out:
cdev->private->flags.recog_done = 1;
if (atomic_dec_and_test(&ccw_device_init_count))
if (adjust_init_count && atomic_dec_and_test(&ccw_device_init_count))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment