summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorgen Lundman <[email protected]>2020-06-15 02:08:21 +0900
committerGitHub <[email protected]>2020-06-14 10:08:21 -0700
commit4f73576ea15fcf38b344b008eaf355480a08bbff (patch)
tree465f683dca61825a49828d6422669813fafe259b
parentf2edc0078fe158a846c6f0bfe33c2bdffeb5dc56 (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Jorgen Lundman <[email protected]> Closes #10445
-rw-r--r--module/zfs/zil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zil.c b/module/zfs/zil.c
index 1c122f35a..34495af55 100644
--- a/module/zfs/zil.c
+++ b/module/zfs/zil.c
@@ -2691,7 +2691,7 @@ zil_commit_waiter(zilog_t *zilog, zil_commit_waiter_t *zcw)
&zcw->zcw_lock, wakeup, USEC2NSEC(1),
CALLOUT_FLAG_ABSOLUTE);
- if (timeleft >= 0 || zcw->zcw_done)
+ if (timeleft != -1 || zcw->zcw_done)
continue;
timedout = B_TRUE;