summaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-03-15 10:22:31 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-03-15 10:22:31 +0000
commitbd2b614cddbdb963198fdd15728e067d209f3cf7 (patch)
tree1710a23e5d69760e81f4955e44aac6e49a944b07 /sys/ufs
parentb93b6840228d38589b6e976f3a325539c4fc9ae0 (diff)
Since p_flag is often manipulated in interrupts and without biglock
it's a good idea to use atomic.h operations on it. This mechanic change updates all bit operations on p_flag to atomic_{set,clear}bits_int. Only exception is that P_OWEUPC is set by MI code before calling need_proftick and it's automatically cleared by ADDUPC. There's no reason for MD handling of that flag since everyone handles it the same way. kettenis@ ok
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_softdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 81460018e82..52b56f7bdba 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep.c,v 1.83 2007/02/04 10:36:05 pedro Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.84 2007/03/15 10:22:30 art Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -5285,12 +5285,12 @@ request_cleanup(resource, islocked)
* to avoid recursively processing the worklist.
*/
if (num_on_worklist > max_softdeps / 10) {
- p->p_flag |= P_SOFTDEP;
+ atomic_setbits_int(&p->p_flag, P_SOFTDEP);
if (islocked)
FREE_LOCK(&lk);
process_worklist_item(NULL, LK_NOWAIT);
process_worklist_item(NULL, LK_NOWAIT);
- p->p_flag &= ~P_SOFTDEP;
+ atomic_clearbits_int(&p->p_flag, P_SOFTDEP);
stat_worklist_push += 2;
if (islocked)
ACQUIRE_LOCK(&lk);