summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_page.h')
-rw-r--r--sys/vm/vm_page.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index aebf79e..fb1cfda 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -194,8 +194,10 @@ extern struct vpglocks pa_lock[];
#define PA_UNLOCK(pa) mtx_unlock(PA_LOCKPTR(pa))
#define PA_UNLOCK_COND(pa) \
do { \
- if (pa) \
- PA_UNLOCK(pa); \
+ if ((pa) != 0) { \
+ PA_UNLOCK((pa)); \
+ (pa) = 0; \
+ } \
} while (0)
#define PA_LOCK_ASSERT(pa, a) mtx_assert(PA_LOCKPTR(pa), (a))
OpenPOWER on IntegriCloud