diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-04-19 11:55:56 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-04-19 11:55:56 +0000 |
commit | cc29e9cd03bbae7b4208a429f2b19cec76c97cda (patch) | |
tree | 7838b983f5eccae84ca029e608a7a433f9d22aa0 /sys/compat/common | |
parent | 9a844318226ccb44fc573779b6ee31f5af4e966e (diff) |
Remove unused mount list simple_lock() goo
Diffstat (limited to 'sys/compat/common')
-rw-r--r-- | sys/compat/common/vfs_syscalls_25.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/compat/common/vfs_syscalls_25.c b/sys/compat/common/vfs_syscalls_25.c index 333724e87e7..5f4d658ca67 100644 --- a/sys/compat/common/vfs_syscalls_25.c +++ b/sys/compat/common/vfs_syscalls_25.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls_25.c,v 1.8 2006/03/05 21:48:54 miod Exp $ */ +/* $OpenBSD: vfs_syscalls_25.c,v 1.9 2006/04/19 11:55:55 pedro Exp $ */ /* * Copyright (c) 1989, 1993 @@ -178,10 +178,10 @@ compat_25_sys_getfsstat(p, v, retval) maxcount = SCARG(uap, bufsize) / sizeof(struct ostatfs); 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; } @@ -194,7 +194,6 @@ compat_25_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; @@ -209,14 +208,14 @@ compat_25_sys_getfsstat(p, v, retval) sfsp += sizeof(osb); } 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); } |