From: Olaf Faaland Date: Mon, 24 Jul 2017 18:22:10 +0000 (-0700) Subject: Use correct macro for hz in mmp.c X-Git-Tag: zfs-0.7.0~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6e5c40382a52206f48cb26cc20ed85294e1b0a9;p=zfs Use correct macro for hz in mmp.c Commit 379ca9c Multi-modifier protection (MMP) used HZ to convert nanoseconds to ticks for use with cv_timedwait() and ddi_get_lbolt(). The correct macro is hz, which is defined within the SPL for kernel space, and within zfs_context.h for user space. Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Giuseppe Di Natale Reviewed-by: George Melikov Signed-off-by: Olaf Faaland Closes #6357 Closes #6360 --- diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c index 6541eca16..ae5478a33 100644 --- a/module/zfs/mmp.c +++ b/module/zfs/mmp.c @@ -446,7 +446,7 @@ mmp_thread(spa_t *spa) CALLB_CPR_SAFE_BEGIN(&cpr); (void) cv_timedwait_sig(&mmp->mmp_thread_cv, &mmp->mmp_thread_lock, ddi_get_lbolt() + - ((next_time - gethrtime()) / (NANOSEC / HZ))); + ((next_time - gethrtime()) / (NANOSEC / hz))); CALLB_CPR_SAFE_END(&cpr, &mmp->mmp_thread_lock); }