From 9de6723b834257eb5bd5c676bf02c8123df5561b Mon Sep 17 00:00:00 2001
From: Brian Behlendorf <behlendorf1@llnl.gov>
Date: Thu, 12 Mar 2009 09:13:40 -0700
Subject: [PATCH] ztest_resume should be ztest_resume_thread in
 pthread_create()

Fix an accidental bug introducted by the pthreads changes.  When creating
a resume thread the handler function was accidentally changed from
ztest_resume to ztest_resume_thread.  There's a decent chance this
may explain some/all of the crashes that have be observed running
ztest.  This issue was exposed and easily fixed once the -Wno-unused
check was removed from the build system.  Happily at least one real
bug fix resulted from that cleanup.
---
 cmd/ztest/ztest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 126ab990ad..ce494fa797 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -3114,7 +3114,7 @@ ztest_run(char *pool)
 	/*
 	 * Create a thread to periodically resume suspended I/O.
 	 */
-	VERIFY(pthread_create(&resume_tid, NULL, ztest_resume, spa) == 0);
+	VERIFY(pthread_create(&resume_tid, NULL, ztest_resume_thread, spa)==0);
 
 	/*
 	 * Verify that we can safely inquire about about any object,