summaryrefslogtreecommitdiff
path: root/sys/kern/vnode_if.src
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2017-05-26 14:20:59 +0000
committerriastradh <riastradh@NetBSD.org>2017-05-26 14:20:59 +0000
commit8320c7e7e49da7ba95a3b263c6ad80f5896cabff (patch)
tree0c5035616ea1c80e6b1145ece65684eb42ac86d6 /sys/kern/vnode_if.src
parent5562080df24bd097fa814e1f6ee0a6e4917a3286 (diff)
Make VOP_RECLAIM do the last unlock of the vnode.
VOP_RECLAIM naturally has exclusive access to the vnode, so having it locked on entry is not strictly necessary -- but it means if there are any final operations that must be done on the vnode, such as ffs_update, requiring exclusive access to it, we can now kassert that the vnode is locked in those operations. We can't just have the caller release the last lock because some file systems don't use genfs_lock, and require the vnode to remain valid for VOP_UNLOCK to work, notably unionfs.
Diffstat (limited to 'sys/kern/vnode_if.src')
-rw-r--r--sys/kern/vnode_if.src7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index fee2a6d7cc5..e5bc729ef5e 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -1,4 +1,4 @@
-# $NetBSD: vnode_if.src,v 1.74 2017/04/26 03:02:49 riastradh Exp $
+# $NetBSD: vnode_if.src,v 1.75 2017/05/26 14:21:00 riastradh Exp $
#
# Copyright (c) 1992, 1993
# The Regents of the University of California. All rights reserved.
@@ -395,11 +395,12 @@ vop_inactive {
};
#
-#% reclaim vp U U U
+#% reclaim vp L U U
#
vop_reclaim {
+ VERSION 2
FSTRANS=NO
- IN LOCKED=NO struct vnode *vp;
+ IN LOCKED=YES struct vnode *vp;
};
#