Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173689
b: refs/heads/master
c: 4ae1e19
h: refs/heads/master
i:
  173687: 24d8ee5
v: v3
  • Loading branch information
Vasu Dev authored and James Bottomley committed Dec 4, 2009
1 parent f42b3bc commit 9508469
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18fa11efc279c20af5eefff2bbe814ca067e51ae
refs/heads/master: 4ae1e19f251335a24ce6cd13f08b4af560ed8765
16 changes: 8 additions & 8 deletions trunk/drivers/scsi/libfc/fc_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ u16 fc_cpu_mask; /* cpu mask for possible cpus */
EXPORT_SYMBOL(fc_cpu_mask);
static u16 fc_cpu_order; /* 2's power to represent total possible cpus */
static struct kmem_cache *fc_em_cachep; /* cache for exchanges */
struct workqueue_struct *fc_exch_workqueue;

/*
* Structure and function definitions for managing Fibre Channel Exchanges
Expand Down Expand Up @@ -427,8 +428,8 @@ static inline void fc_exch_timer_set_locked(struct fc_exch *ep,

FC_EXCH_DBG(ep, "Exchange timer armed\n");

if (schedule_delayed_work(&ep->timeout_work,
msecs_to_jiffies(timer_msec)))
if (queue_delayed_work(fc_exch_workqueue, &ep->timeout_work,
msecs_to_jiffies(timer_msec)))
fc_exch_hold(ep); /* hold for timer */
}

Expand Down Expand Up @@ -1619,12 +1620,6 @@ static void fc_exch_reset(struct fc_exch *ep)

spin_lock_bh(&ep->ex_lock);
ep->state |= FC_EX_RST_CLEANUP;
/*
* we really want to call del_timer_sync, but cannot due
* to the lport calling with the lport lock held (some resp
* functions can also grab the lport lock which could cause
* a deadlock).
*/
if (cancel_delayed_work(&ep->timeout_work))
atomic_dec(&ep->ex_refcnt); /* drop hold for timer */
resp = ep->resp;
Expand Down Expand Up @@ -2203,6 +2198,7 @@ void fc_exch_mgr_free(struct fc_lport *lport)
{
struct fc_exch_mgr_anchor *ema, *next;

flush_workqueue(fc_exch_workqueue);
list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list)
fc_exch_mgr_del(ema);
}
Expand Down Expand Up @@ -2338,6 +2334,9 @@ int fc_setup_exch_mgr()
}
fc_cpu_mask--;

fc_exch_workqueue = create_singlethread_workqueue("fc_exch_workqueue");
if (!fc_exch_workqueue)
return -ENOMEM;
return 0;
}

Expand All @@ -2346,5 +2345,6 @@ int fc_setup_exch_mgr()
*/
void fc_destroy_exch_mgr()
{
destroy_workqueue(fc_exch_workqueue);
kmem_cache_destroy(fc_em_cachep);
}

0 comments on commit 9508469

Please sign in to comment.