aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 2e7f52b75983..16fa8e4137c2 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2038,6 +2038,8 @@ vget(struct vnode *vp, int flags, struct thread *td)
error = 0;
VFS_ASSERT_GIANT(vp->v_mount);
+ VNASSERT((flags & LK_TYPE_MASK) != 0, vp,
+ ("vget: invalid lock operation"));
if ((flags & LK_INTERLOCK) == 0)
VI_LOCK(vp);
vholdl(vp);