diff options
author | 2023-11-01 12:57:51 +0100 | |
---|---|---|
committer | 2023-12-12 14:41:58 +0100 | |
commit | b8fa3e90965eeb2f83aa637ba0d0d6fd2a524004 (patch) | |
tree | c9cf4c5d9fcfbb8762d066bae352fa948044531f /drivers/s390/cio/device_pgid.c | |
parent | s390: update defconfigs (diff) | |
download | wireguard-linux-b8fa3e90965eeb2f83aa637ba0d0d6fd2a524004.tar.xz wireguard-linux-b8fa3e90965eeb2f83aa637ba0d0d6fd2a524004.zip |
s390/cio: make sch->lock spinlock pointer a member
The lock member of struct subchannel used to be a spinlock, but became
a pointer to a spinlock with commit 2ec2298412e1 ("[S390] subchannel
lock conversion."). This might have been justified back then, but with
the current state of affairs, there is no reason to manage a separate
spinlock object.
Let's simplify things and pull the spinlock back into struct subchannel.
Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Link: https://lore.kernel.org/r/20231101115751.2308307-1-pasic@linux.ibm.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device_pgid.c')
-rw-r--r-- | drivers/s390/cio/device_pgid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index 3862961697eb..ad90045873e2 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c @@ -698,29 +698,29 @@ int ccw_device_stlck(struct ccw_device *cdev) return -ENOMEM; init_completion(&data.done); data.rc = -EIO; - spin_lock_irq(sch->lock); + spin_lock_irq(&sch->lock); rc = cio_enable_subchannel(sch, (u32)virt_to_phys(sch)); if (rc) goto out_unlock; /* Perform operation. */ cdev->private->state = DEV_STATE_STEAL_LOCK; ccw_device_stlck_start(cdev, &data, &buffer[0], &buffer[32]); - spin_unlock_irq(sch->lock); + spin_unlock_irq(&sch->lock); /* Wait for operation to finish. */ if (wait_for_completion_interruptible(&data.done)) { /* Got a signal. */ - spin_lock_irq(sch->lock); + spin_lock_irq(&sch->lock); ccw_request_cancel(cdev); - spin_unlock_irq(sch->lock); + spin_unlock_irq(&sch->lock); wait_for_completion(&data.done); } rc = data.rc; /* Check results. */ - spin_lock_irq(sch->lock); + spin_lock_irq(&sch->lock); cio_disable_subchannel(sch); cdev->private->state = DEV_STATE_BOXED; out_unlock: - spin_unlock_irq(sch->lock); + spin_unlock_irq(&sch->lock); kfree(buffer); return rc; |