summaryrefslogtreecommitdiff
path: root/sys/compat/netbsd
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-04-19 11:55:56 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-04-19 11:55:56 +0000
commitcc29e9cd03bbae7b4208a429f2b19cec76c97cda (patch)
tree7838b983f5eccae84ca029e608a7a433f9d22aa0 /sys/compat/netbsd
parent9a844318226ccb44fc573779b6ee31f5af4e966e (diff)
Remove unused mount list simple_lock() goo
Diffstat (limited to 'sys/compat/netbsd')
-rw-r--r--sys/compat/netbsd/netbsd_file.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/compat/netbsd/netbsd_file.c b/sys/compat/netbsd/netbsd_file.c
index 47e7e326f4f..7a935798b6a 100644
--- a/sys/compat/netbsd/netbsd_file.c
+++ b/sys/compat/netbsd/netbsd_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_file.c,v 1.7 2006/03/05 21:48:56 miod Exp $ */
+/* $OpenBSD: netbsd_file.c,v 1.8 2006/04/19 11:55:55 pedro Exp $ */
/* $NetBSD: freebsd_file.c,v 1.3 1996/05/03 17:03:09 christos Exp $ */
/*
@@ -631,10 +631,10 @@ netbsd_sys_getfsstat(p, v, retval)
maxcount = SCARG(uap, bufsize) / sizeof(struct netbsd_statfs);
sfsp = (caddr_t)SCARG(uap, buf);
count = 0;
- simple_lock(&mountlist_slock);
+
for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
- if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock)) {
+ if (vfs_busy(mp, LK_NOWAIT, NULL)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
continue;
}
@@ -647,7 +647,6 @@ netbsd_sys_getfsstat(p, v, retval)
(flags == MNT_WAIT ||
flags == 0) &&
(error = VFS_STATFS(mp, sp, p))) {
- simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
vfs_unbusy(mp);
continue;
@@ -663,15 +662,15 @@ netbsd_sys_getfsstat(p, v, retval)
sfsp += sizeof(fsb);
}
count++;
- simple_lock(&mountlist_slock);
nmp = CIRCLEQ_NEXT(mp, mnt_list);
vfs_unbusy(mp);
}
- simple_unlock(&mountlist_slock);
+
if (sfsp && count > maxcount)
*retval = maxcount;
else
*retval = count;
+
return (0);
}