WSL2-Linux-Kernel/drivers/s390
Sebastian Ott 181d95229b [S390] dasd: fix refcounting in dasd_change_state
To set a dasd online dasd_change_state is called twice. The first
cycle will schedule initial analysis of the device, set the rc to
-EAGAIN and will not touch the device state any more.
The initial analysis will in turn call dasd_change_state to increase
the state to the final DASD_STATE_ONLINE.

If the dasd_change_state on the second thread outruns the other one
both finish with the state set to DASD_STATE_ONLINE and the device
refcount will be decreased by 2.

Fix this by leaving dasd_change_state on rc == -EAGAIN so that the
refcount will always be decreased by 1.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-06-22 12:08:23 +02:00
..
block [S390] dasd: fix refcounting in dasd_change_state 2009-06-22 12:08:23 +02:00
char [S390] driver_data access 2009-06-22 12:08:23 +02:00
cio [S390] qdio: Sanitize do_QDIO sanity checks 2009-06-22 12:08:21 +02:00
crypto [S390] ap/zcrypt: Suspend/Resume ap bus and zcrypt 2009-06-22 12:08:21 +02:00
kvm virtio: find_vqs/del_vqs virtio operations 2009-06-12 22:16:36 +09:30
net [S390] driver_data access 2009-06-22 12:08:23 +02:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-06-17 09:50:44 -07:00
Makefile [S390] split/move machine check handler code 2009-03-26 15:24:10 +01:00