mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-04-06 17:49:11 +03:00
Upstream: zil_commit_waiter() can stall forever
On macOS clock_t is unsigned, so when cv_timedwait_hires() returns -1 we loop forever. The conditional was tweaked to ignore signedness. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #10445
This commit is contained in:
parent
f2edc0078f
commit
4f73576ea1
@ -2691,7 +2691,7 @@ zil_commit_waiter(zilog_t *zilog, zil_commit_waiter_t *zcw)
|
|||||||
&zcw->zcw_lock, wakeup, USEC2NSEC(1),
|
&zcw->zcw_lock, wakeup, USEC2NSEC(1),
|
||||||
CALLOUT_FLAG_ABSOLUTE);
|
CALLOUT_FLAG_ABSOLUTE);
|
||||||
|
|
||||||
if (timeleft >= 0 || zcw->zcw_done)
|
if (timeleft != -1 || zcw->zcw_done)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
timedout = B_TRUE;
|
timedout = B_TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user