diff options
author | Chunwei Chen <[email protected]> | 2016-05-23 14:12:22 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-05-24 13:02:10 -0700 |
commit | b3a22a0a005eef22d696cc77baa26ef80d1bdc0c (patch) | |
tree | 1c9ca91f7c418038b1a9a5daef2f8000b3189dba /module | |
parent | 5ce028b0d4b650b42cb81b3fdf71b517adce4552 (diff) |
Fix taskq_wait_outstanding re-evaluate tq_next_id
wait_event is a macro, so the current implementation will cause re-
evaluation of tq_next_id every time it wakes up. This would cause
taskq_wait_outstanding(tq, 0) to be equivalent to taskq_wait(tq)
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tim Chase <[email protected]>
Issue #553
Diffstat (limited to 'module')
-rw-r--r-- | module/spl/spl-taskq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 9784473bd..320ad3914 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -447,8 +447,8 @@ taskq_wait_outstanding_check(taskq_t *tq, taskqid_t id) void taskq_wait_outstanding(taskq_t *tq, taskqid_t id) { - wait_event(tq->tq_wait_waitq, - taskq_wait_outstanding_check(tq, id ? id : tq->tq_next_id - 1)); + id = id ? id : tq->tq_next_id - 1; + wait_event(tq->tq_wait_waitq, taskq_wait_outstanding_check(tq, id)); } EXPORT_SYMBOL(taskq_wait_outstanding); |