aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_fc.c')
-rw-r--r--drivers/s390/scsi/zfcp_fc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index c22c47868550..aab8123c5966 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -98,8 +98,12 @@ static void zfcp_wka_port_offline(struct work_struct *work)
98 struct zfcp_wka_port *wka_port = 98 struct zfcp_wka_port *wka_port =
99 container_of(dw, struct zfcp_wka_port, work); 99 container_of(dw, struct zfcp_wka_port, work);
100 100
101 wait_event(wka_port->completion_wq, 101 /* Don't wait forvever. If the wka_port is too busy take it offline
102 atomic_read(&wka_port->refcount) == 0); 102 through a new call later */
103 if (!wait_event_timeout(wka_port->completion_wq,
104 atomic_read(&wka_port->refcount) == 0,
105 HZ >> 1))
106 return;
103 107
104 mutex_lock(&wka_port->mutex); 108 mutex_lock(&wka_port->mutex);
105 if ((atomic_read(&wka_port->refcount) != 0) || 109 if ((atomic_read(&wka_port->refcount) != 0) ||