diff options
author | kib <kib@FreeBSD.org> | 2007-03-29 08:26:04 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2007-03-29 08:26:04 +0000 |
commit | 951894c128048901001ad164404b74cfb77d0a83 (patch) | |
tree | 027be02f346d35ee3fab713988d1231d5bb25210 /sys | |
parent | 96951962986768f0f216181e20ec59426f00d809 (diff) | |
download | FreeBSD-src-951894c128048901001ad164404b74cfb77d0a83.zip FreeBSD-src-951894c128048901001ad164404b74cfb77d0a83.tar.gz |
Revert rev. 1.205. Replace unconditional acquision of Giant when QUOTAS are
defined with VFS_LOCK_GIANT(NULL) call.
This shall fix softdep operation when mpsafe_vfs = 0.
Reported and tested by: kris
Submitted by: tegge
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 431548e..08d9908 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -722,12 +722,14 @@ softdep_flush(void) struct ufsmount *ump; struct thread *td; int remaining; + int vfslocked; td = curthread; td->td_pflags |= TDP_NORUNNINGBUF; for (;;) { kthread_suspend_check(softdepproc); + vfslocked = VFS_LOCK_GIANT((struct mount *)NULL); ACQUIRE_LOCK(&lk); /* * If requested, try removing inode or removal dependencies. @@ -743,6 +745,7 @@ softdep_flush(void) wakeup_one(&proc_waiting); } FREE_LOCK(&lk); + VFS_UNLOCK_GIANT(vfslocked); remaining = 0; mtx_lock(&mountlist_mtx); for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { @@ -751,10 +754,12 @@ softdep_flush(void) continue; if (vfs_busy(mp, LK_NOWAIT, &mountlist_mtx, td)) continue; + vfslocked = VFS_LOCK_GIANT(mp); softdep_process_worklist(mp, 0); ump = VFSTOUFS(mp); remaining += ump->softdep_on_worklist - ump->softdep_on_worklist_inprogress; + VFS_UNLOCK_GIANT(vfslocked); mtx_lock(&mountlist_mtx); nmp = TAILQ_NEXT(mp, mnt_list); vfs_unbusy(mp, td); |