diff options
author | Tejun Heo <tj@kernel.org> | 2010-10-19 19:24:36 +0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2011-01-17 08:16:31 +0300 |
commit | f06267104dd9112f11586830d22501d0e26245ea (patch) | |
tree | 8f7c364abc84a5f69269974eaa2b955b24d8f421 /drivers/infiniband/core/cache.c | |
parent | 948579cd8c6ea7c8c98c52b79f4470952e182ebd (diff) | |
download | linux-f06267104dd9112f11586830d22501d0e26245ea.tar.xz |
RDMA: Update workqueue usage
* ib_wq is added, which is used as the common workqueue for infiniband
instead of the system workqueue. All system workqueue usages
including flush_scheduled_work() callers are converted to use and
flush ib_wq.
* cancel_delayed_work() + flush_scheduled_work() converted to
cancel_delayed_work_sync().
* qib_wq is removed and ib_wq is used instead.
This is to prepare for deprecation of flush_scheduled_work().
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/cache.c')
-rw-r--r-- | drivers/infiniband/core/cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index 68883565b725..f9ba7d74dfc0 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -308,7 +308,7 @@ static void ib_cache_event(struct ib_event_handler *handler, INIT_WORK(&work->work, ib_cache_task); work->device = event->device; work->port_num = event->element.port_num; - schedule_work(&work->work); + queue_work(ib_wq, &work->work); } } } @@ -368,7 +368,7 @@ static void ib_cache_cleanup_one(struct ib_device *device) int p; ib_unregister_event_handler(&device->cache.event_handler); - flush_scheduled_work(); + flush_workqueue(ib_wq); for (p = 0; p <= end_port(device) - start_port(device); ++p) { kfree(device->cache.pkey_cache[p]); |