]> granicus.if.org Git - zfs/commit
Fix cv_timedwait timeout
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 25 May 2017 17:01:44 +0000 (10:01 -0700)
committerGitHub <noreply@github.com>
Thu, 25 May 2017 17:01:44 +0000 (10:01 -0700)
commit2ded1c7eff76f9f53b179659f25f3868b6a354ec
tree6146f1345fca220a0539a9ec6dd13a205579f8a9
parent8f87971e1fd11e3bca034dff2cbc0e884381c350
Fix cv_timedwait timeout

Perform the already past expiration time check before updating
cvp->cv_mutex with the provided mutex.  This check only depends
on local state.  Doing it first ensures that cvp->cv_mutex will not
be updated in the timeout case or if it's ever called with an
expire_time <= now.

Reviewed-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #616
module/spl/spl-condvar.c