diff options
author | kib <kib@FreeBSD.org> | 2006-11-01 13:48:44 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2006-11-01 13:48:44 +0000 |
commit | 1776bc8845b90492d0b68d3757b0ce4ebbc712e0 (patch) | |
tree | 1b73c39376b05941ae00effef382c7ea3fb891c9 /sys/ufs | |
parent | bd59c267bdacaad42b4b9fff2245990ffe8958cb (diff) | |
download | FreeBSD-src-1776bc8845b90492d0b68d3757b0ce4ebbc712e0.zip FreeBSD-src-1776bc8845b90492d0b68d3757b0ce4ebbc712e0.tar.gz |
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
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 25272f7..4ae9980 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -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) { |