Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Add an assertion: it makes no sense to call vget() ...



details:   https://anonhg.NetBSD.org/src/rev/0633002896d4
branches:  trunk
changeset: 756581:0633002896d4
user:      hannken <hannken%NetBSD.org@localhost>
date:      Sun Jul 25 10:23:40 2010 +0000

description:
Add an assertion: it makes no sense to call vget() with LK_RETRY.

diffstat:

 sys/kern/vfs_subr.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 672b7b296a66 -r 0633002896d4 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Sun Jul 25 09:54:37 2010 +0000
+++ b/sys/kern/vfs_subr.c       Sun Jul 25 10:23:40 2010 +0000
@@ -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



Home | Main Index | Thread Index | Old Index