Aquire Giant in the softdep_flush for clear_remove() and clear_inodedeps()

processing when QUOTA is set.

Reported and tested by:	Peter Holm
Reviewed by:	tegge
MFC after:	3 days
This commit is contained in:
Konstantin Belousov 2006-11-01 13:48:44 +00:00
parent 89780ffb72
commit 2276d0814f

View File

@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include "opt_ffs.h"
#include "opt_quota.h"
#ifndef SOFTUPDATES
@ -728,6 +729,9 @@ softdep_flush(void)
for (;;) {
kthread_suspend_check(softdepproc);
#ifdef QUOTA
mtx_lock(&Giant);
#endif
ACQUIRE_LOCK(&lk);
/*
* If requested, try removing inode or removal dependencies.
@ -743,6 +747,9 @@ softdep_flush(void)
wakeup_one(&proc_waiting);
}
FREE_LOCK(&lk);
#ifdef QUOTA
mtx_unlock(&Giant);
#endif
remaining = 0;
mtx_lock(&mountlist_mtx);
for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) {