]> git.proxmox.com Git - mirror_spl.git/commit - module/spl/spl-taskq.c
Fix taskq_wait_id()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 29 Apr 2013 20:47:59 +0000 (13:47 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 3 May 2013 21:32:29 +0000 (14:32 -0700)
commit99c452bbbaeaa8fae498da1774d81e146bdd45ed
tree8fbe4860ef76a17e383be470d6ab1da27d2ff209
parentab59be7bc752481db64df07c821e2ae6bf2ae71b
Fix taskq_wait_id()

The existing taskq_wait_id() function can incorrectly block
indefinitely.  Reimplement it more simply using wait_event()
in a similar fashion to taskq_wait_all().

This flaw was uncovered in the context of moving vn_rdwr() to
a taskq.  Previously taskq_wait_id() had no consumers outside
the SPLAT task framework which is why the issue went unnoticed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/spl/spl-taskq.c