[PATCH 23/31] workqueue: implement get/put_pwq()

2013-03-01 Thread Tejun Heo
Add pool_workqueue->refcnt along with get/put_pwq(). Both per-cpu and unbound pwqs have refcnts and any work item inserted on a pwq increments the refcnt which is dropped when the work item finishes. For per-cpu pwqs the base ref is never dropped and destroy_workqueue() frees the pwqs as before.

[PATCH 23/31] workqueue: implement get/put_pwq()

2013-03-01 Thread Tejun Heo
Add pool_workqueue-refcnt along with get/put_pwq(). Both per-cpu and unbound pwqs have refcnts and any work item inserted on a pwq increments the refcnt which is dropped when the work item finishes. For per-cpu pwqs the base ref is never dropped and destroy_workqueue() frees the pwqs as before.