original_kernel/drivers/s390/block
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
..
Kconfig
Makefile
dasd.c [S390] dasd: fix refcounting in dasd_change_state 2009-06-22 12:08:23 +02:00
dasd_3990_erp.c
dasd_alias.c
dasd_devmap.c [S390] pm: dasd power management callbacks. 2009-06-16 10:31:10 +02:00
dasd_diag.c
dasd_diag.h
dasd_eckd.c [S390] dasd_pm: fix stop flag handling 2009-06-22 12:08:22 +02:00
dasd_eckd.h
dasd_eer.c
dasd_erp.c
dasd_fba.c [S390] pm: dasd power management callbacks. 2009-06-16 10:31:10 +02:00
dasd_fba.h
dasd_genhd.c
dasd_int.h [S390] pm: dasd power management callbacks. 2009-06-16 10:31:10 +02:00
dasd_ioctl.c
dasd_proc.c
dcssblk.c [S390] pm: dcssblk power management callbacks. 2009-06-16 10:31:22 +02:00
xpram.c [S390] pm: xpram driver power management callbacks 2009-06-16 10:31:11 +02:00