summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-01-19 20:13:04 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-01-19 20:13:04 +0000
commit281b1199d29077c625f9a1abf215e371e919d9ff (patch)
tree6eeb832f154ffc434a39fc459ba583591b84b10f
parentd54af8c45a3d77b88393a007c562a43eabb43491 (diff)
Fix bracing in ASSERT_VP_ISLOCKED(vp) macro to not always panic()
From Helg (xx404 (at) msn.com)
-rw-r--r--sys/kern/vfs_vops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/vfs_vops.c b/sys/kern/vfs_vops.c
index f7ec9a52b03..fa23acebc03 100644
--- a/sys/kern/vfs_vops.c
+++ b/sys/kern/vfs_vops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vops.c,v 1.9 2013/08/13 05:52:24 guenther Exp $ */
+/* $OpenBSD: vfs_vops.c,v 1.10 2015/01/19 20:13:03 guenther Exp $ */
/*
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
*
@@ -48,10 +48,11 @@
#include <sys/unistd.h>
#ifdef VFSLCKDEBUG
-#define ASSERT_VP_ISLOCKED(vp) do { \
- if (((vp)->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) \
- VOP_PRINT(vp); \
- panic("vp not locked"); \
+#define ASSERT_VP_ISLOCKED(vp) do { \
+ if (((vp)->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) { \
+ VOP_PRINT(vp); \
+ panic("vp not locked"); \
+ } \
} while (0)
#else
#define ASSERT_VP_ISLOCKED(vp) /* nothing */