Skip to content

Commit

Permalink
Mark UFS as being MP-Safe in "options QUOTA" case too. Remove no more
Browse files Browse the repository at this point in the history
neccessary Giant acquisions in softdepend processing code.

Tested by:	Peter Holm
Reviewed by:	tegge
Approved by:	re (kensmith)
  • Loading branch information
kostikbel committed Mar 20, 2007
1 parent eecb0a8 commit 7f02b95
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
9 changes: 0 additions & 9 deletions sys/ufs/ffs/ffs_softdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,16 +722,12 @@ 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);
#ifdef QUOTA
mtx_lock(&Giant);
#endif
ACQUIRE_LOCK(&lk);
/*
* If requested, try removing inode or removal dependencies.
Expand All @@ -747,9 +743,6 @@ 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) {
Expand All @@ -758,12 +751,10 @@ 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);
Expand Down
10 changes: 0 additions & 10 deletions sys/ufs/ffs/ffs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,19 +880,9 @@ ffs_mountfs(devvp, mp, td)
(void) ufs_extattr_autostart(mp, td);
#endif /* !UFS_EXTATTR_AUTOSTART */
#endif /* !UFS_EXTATTR */
#ifdef QUOTA
/*
* Our bufobj must require giant for snapshots when quotas are
* enabled.
*/
BO_LOCK(&devvp->v_bufobj);
devvp->v_bufobj.bo_flag |= BO_NEEDSGIANT;
BO_UNLOCK(&devvp->v_bufobj);
#else
MNT_ILOCK(mp);
mp->mnt_kern_flag |= MNTK_MPSAFE;
MNT_IUNLOCK(mp);
#endif
return (0);
out:
if (bp)
Expand Down

0 comments on commit 7f02b95

Please sign in to comment.