]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.52/scsi-qla2xxx-correction-to-vha-vref_count-timeout.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.52 / scsi-qla2xxx-correction-to-vha-vref_count-timeout.patch
CommitLineData
3b4017f1
GKH
1From 6e98095f8fb6d98da34c4e6c34e69e7c638d79c0 Mon Sep 17 00:00:00 2001
2From: Joe Carnuccio <joe.carnuccio@cavium.com>
3Date: Wed, 23 Aug 2017 15:04:55 -0700
4Subject: scsi: qla2xxx: Correction to vha->vref_count timeout
5
6From: Joe Carnuccio <joe.carnuccio@cavium.com>
7
8commit 6e98095f8fb6d98da34c4e6c34e69e7c638d79c0 upstream.
9
10Fix incorrect second argument for wait_event_timeout()
11
12Fixes: c4a9b538ab2a ("qla2xxx: Allow vref count to timeout on vport delete.")
13Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
14Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
15Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18---
19 drivers/scsi/qla2xxx/qla_mid.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22--- a/drivers/scsi/qla2xxx/qla_mid.c
23+++ b/drivers/scsi/qla2xxx/qla_mid.c
24@@ -74,7 +74,7 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t
25 * ensures no active vp_list traversal while the vport is removed
26 * from the queue)
27 */
28- wait_event_timeout(vha->vref_waitq, atomic_read(&vha->vref_count),
29+ wait_event_timeout(vha->vref_waitq, !atomic_read(&vha->vref_count),
30 10*HZ);
31
32 spin_lock_irqsave(&ha->vport_slock, flags);