aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2009-12-07 06:51:39 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:33 -0500
commit7a8ad1001c51bba0507ee08cb4323d8ddcb07c70 (patch)
treea8e724e437acd596a437d9e9e6ff10167437fbac /drivers/s390/cio
parent6e9a0f67deeca90c433ac40b887cee8da3bdcea2 (diff)
[S390] cio: change locking in io_subchannel_remove
IO subchannels are always unregistered in process context, so use spin_lock_irq in the corresponding remove callback. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index bd6e8cf77fad..dc97cb9f227f 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1065,17 +1065,16 @@ static int
1065io_subchannel_remove (struct subchannel *sch) 1065io_subchannel_remove (struct subchannel *sch)
1066{ 1066{
1067 struct ccw_device *cdev; 1067 struct ccw_device *cdev;
1068 unsigned long flags;
1069 1068
1070 cdev = sch_get_cdev(sch); 1069 cdev = sch_get_cdev(sch);
1071 if (!cdev) 1070 if (!cdev)
1072 goto out_free; 1071 goto out_free;
1073 io_subchannel_quiesce(sch); 1072 io_subchannel_quiesce(sch);
1074 /* Set ccw device to not operational and drop reference. */ 1073 /* Set ccw device to not operational and drop reference. */
1075 spin_lock_irqsave(cdev->ccwlock, flags); 1074 spin_lock_irq(cdev->ccwlock);
1076 sch_set_cdev(sch, NULL); 1075 sch_set_cdev(sch, NULL);
1077 cdev->private->state = DEV_STATE_NOT_OPER; 1076 cdev->private->state = DEV_STATE_NOT_OPER;
1078 spin_unlock_irqrestore(cdev->ccwlock, flags); 1077 spin_unlock_irq(cdev->ccwlock);
1079 ccw_device_unregister(cdev); 1078 ccw_device_unregister(cdev);
1080out_free: 1079out_free:
1081 kfree(sch->private); 1080 kfree(sch->private);