projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
2706fa0
)
workqueue: grab sw->lock for flag manipulation
author
Jens Axboe
<axboe@fb.com>
Mon, 7 Dec 2015 17:43:45 +0000
(10:43 -0700)
committer
Jens Axboe
<axboe@fb.com>
Mon, 7 Dec 2015 17:43:45 +0000
(10:43 -0700)
For consistency, should not matter in the shutdown path.
Signed-off-by: Jens Axboe <axboe@fb.com>
workqueue.c
patch
|
blob
|
blame
|
history
diff --git
a/workqueue.c
b/workqueue.c
index 7cd83bfd6216bdf9cc69c70d59d9760fc31a7b9b..27570b2a0b20e5e7cd4ad0a9ccaacf697f6962c7 100644
(file)
--- a/
workqueue.c
+++ b/
workqueue.c
@@
-388,7
+388,9
@@
void workqueue_exit(struct workqueue *wq)
sw = &wq->workers[i];
if (sw->flags & SW_F_ACCOUNTED)
continue;
+ pthread_mutex_lock(&sw->lock);
sw->flags |= SW_F_ACCOUNTED;
+ pthread_mutex_unlock(&sw->lock);
shutdown_worker(sw, &sum_cnt);
shutdown++;
}