Module Name: src
Committed By: hannken
Date: Sun Jul 25 10:23:40 UTC 2010
Modified Files:
src/sys/kern: vfs_subr.c
Log Message:
Add an assertion: it makes no sense to call vget() with LK_RETRY.
To generate a diff of this commit:
cvs rdiff -u -r1.410 -r1.411 src/sys/kern/vfs_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.410 src/sys/kern/vfs_subr.c:1.411
--- src/sys/kern/vfs_subr.c:1.410 Wed Jul 21 17:52:12 2010
+++ src/sys/kern/vfs_subr.c Sun Jul 25 10:23:40 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_subr.c,v 1.410 2010/07/21 17:52:12 hannken Exp $ */
+/* $NetBSD: vfs_subr.c,v 1.411 2010/07/25 10:23:40 hannken Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.410 2010/07/21 17:52:12 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.411 2010/07/25 10:23:40 hannken Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -1283,6 +1283,7 @@
KASSERT((vp->v_iflag & VI_MARKER) == 0);
KASSERT(mutex_owned(&vp->v_interlock));
+ KASSERT((flags & ~(LK_SHARED|LK_EXCLUSIVE|LK_NOWAIT)) == 0);
/*
* Before adding a reference, we must remove the vnode