Acquire Giant at the start of the raid rebuild kthreads.

Reported by:	Masachika ISHIZUKA <ishizuka@ish.org>
Reviewed by:	sos
Approved by:	re (bmah)
This commit is contained in:
John Baldwin 2003-05-08 16:38:14 +00:00
parent f8f4e47610
commit 258dbbab69
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114843

View File

@ -969,6 +969,7 @@ ar_rebuild(void *arg)
int disk, s, count = 0, error = 0;
caddr_t buffer;
mtx_lock(&Giant);
if ((rdp->flags & (AR_F_READY|AR_F_DEGRADED)) != (AR_F_READY|AR_F_DEGRADED))
kthread_exit(EEXIST);