From 4df5af489b43f230335c8627beb3eb064c745800 Mon Sep 17 00:00:00 2001 From: ad Date: Wed, 30 Jan 2008 14:53:41 +0000 Subject: [PATCH] vlockstatus: return LK_EXCLOTHER as appropriate, for LFS. XXX --- sys/kern/vfs_subr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7e2fc1bbbeb7..fa0bffa2e2b4 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.328 2008/01/30 12:33:45 ad Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.329 2008/01/30 14:53:41 ad Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. @@ -82,12 +82,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.328 2008/01/30 12:33:45 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.329 2008/01/30 14:53:41 ad Exp $"); #include "opt_ddb.h" #include "opt_compat_netbsd.h" #include "opt_compat_43.h" +#define __RWLOCK_PRIVATE /* XXX LFS */ + #include #include #include @@ -1962,5 +1964,9 @@ vlockstatus(struct vnlock *vl) if (rw_read_held(&vl->vl_lock)) { return LK_SHARED; } + if ((vl->vl_lock.rw_owner & RW_WRITE_LOCKED) != 0) { + /* XXX LFS */ + return LK_EXCLOTHER; + } return 0; }