diff options
author | jeff <jeff@FreeBSD.org> | 2003-04-12 01:05:19 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-04-12 01:05:19 +0000 |
commit | 886a932d7b1cd41365958f4e97e27591bc428d40 (patch) | |
tree | 61a88d420f3a850b88ef3a2b641f419c7161ac4a /sys/ufs | |
parent | cb24fd3c572701a01f5e94ba10d53c332c14c550 (diff) | |
download | FreeBSD-src-886a932d7b1cd41365958f4e97e27591bc428d40.zip FreeBSD-src-886a932d7b1cd41365958f4e97e27591bc428d40.tar.gz |
- Use the sched_nice() api instead of setting the nice value directly.
Tested by: Steve Kargl <sgk@troutmask.apl.washington.edu>
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 442d99a..478c3f5 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -42,6 +42,7 @@ #include <sys/buf.h> #include <sys/proc.h> #include <sys/namei.h> +#include <sys/sched.h> #include <sys/stat.h> #include <sys/malloc.h> #include <sys/mount.h> @@ -300,7 +301,7 @@ restart: */ if (td->td_ksegrp->kg_nice > 0) { saved_nice = td->td_ksegrp->kg_nice; - td->td_ksegrp->kg_nice = 0; + sched_nice(td->td_ksegrp, 0); } /* * Suspend operation on filesystem. @@ -644,7 +645,7 @@ done: bawrite(sbp); out: if (saved_nice > 0) - td->td_ksegrp->kg_nice = saved_nice; + sched_nice(td->td_ksegrp, saved_nice); if (fs->fs_active != 0) { FREE(fs->fs_active, M_DEVBUF); fs->fs_active = 0; |