Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Fix taskq_wait_outstanding re-evaluate tq_next_id
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Chunwei Chen committed May 23, 2016
1 parent 0a3f75b commit e4082f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/spl/spl-taskq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e4082f9

Please sign in to comment.