Fix build of these files after the vfs_trybusy change. Apply the same

modification done in compat/common/vfs_syscalls_20.c:1.27.
This commit is contained in:
jmmv 2008-04-30 06:49:23 +00:00
parent 10f791f083
commit b8f1187ff1
3 changed files with 9 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_compat_20.c,v 1.21 2008/03/21 21:54:58 ad Exp $ */
/* $NetBSD: netbsd32_compat_20.c,v 1.22 2008/04/30 06:49:23 jmmv Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.21 2008/03/21 21:54:58 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.22 2008/04/30 06:49:23 jmmv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -106,8 +106,7 @@ compat_20_netbsd32_getfsstat(struct lwp *l, const struct compat_20_netbsd32_getf
mutex_enter(&mountlist_lock);
count = 0;
for (mp = mountlist.cqh_first; mp != (void *)&mountlist; mp = nmp) {
if (vfs_trybusy(mp, RW_READER, &mountlist_lock)) {
nmp = mp->mnt_list.cqe_next;
if (vfs_trybusy(mp, RW_READER, &nmp)) {
continue;
}
if (sfsp && count < maxcount) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: osf1_mount.c,v 1.41 2008/04/22 21:33:13 ad Exp $ */
/* $NetBSD: osf1_mount.c,v 1.42 2008/04/30 06:49:23 jmmv Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.41 2008/04/22 21:33:13 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.42 2008/04/30 06:49:23 jmmv Exp $");
#if defined(_KERNEL_OPT)
#include "fs_nfs.h"
@ -150,8 +150,7 @@ osf1_sys_getfsstat(struct lwp *l, const struct osf1_sys_getfsstat_args *uap, reg
mutex_enter(&mountlist_lock);
for (count = 0, mp = mountlist.cqh_first; mp != (void *)&mountlist;
mp = nmp) {
if (vfs_trybusy(mp, RW_READER, &mountlist_lock)) {
nmp = mp->mnt_list.cqe_next;
if (vfs_trybusy(mp, RW_READER, &nmp)) {
continue;
}
if (osf_sfsp && count < maxcount) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_fs.c,v 1.46 2008/01/30 11:46:59 ad Exp $ */
/* $NetBSD: ultrix_fs.c,v 1.47 2008/04/30 06:49:23 jmmv Exp $ */
/*
* Copyright (c) 1995, 1997 Jonathan Stone
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.46 2008/01/30 11:46:59 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.47 2008/04/30 06:49:23 jmmv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -257,8 +257,7 @@ ultrix_sys_getmnt(struct lwp *l, const struct ultrix_sys_getmnt_args *uap, regis
mutex_enter(&mountlist_lock);
for (count = 0, mp = mountlist.cqh_first;
mp != (void*)&mountlist && count < maxcount; mp = nmp) {
if (vfs_trybusy(mp, RW_READER, &mountlist_lock)) {
nmp = mp->mnt_list.cqe_next;
if (vfs_trybusy(mp, RW_READER, &nmp)) {
continue;
}
if (sfsp != NULL) {