From c5ecc8ab11db322d67127d71f70325e53fbd5acc Mon Sep 17 00:00:00 2001 From: thorpej Date: Thu, 5 Mar 1998 22:49:20 +0000 Subject: [PATCH] Arrgh, I said "abort", dammit... --- sys/compat/ultrix/ultrix_fs.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/sys/compat/ultrix/ultrix_fs.c b/sys/compat/ultrix/ultrix_fs.c index e0b789ed3abe..c06000c57f64 100644 --- a/sys/compat/ultrix/ultrix_fs.c +++ b/sys/compat/ultrix/ultrix_fs.c @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_fs.c,v 1.13 1998/03/05 22:48:34 thorpej Exp $ */ +/* $NetBSD: ultrix_fs.c,v 1.14 1998/03/05 22:49:20 thorpej Exp $ */ /* * Copyright (c) 1995, 1997 Jonathan Stone @@ -45,9 +45,6 @@ #include #include #include -#include - -#include #include #include @@ -247,28 +244,22 @@ ultrix_sys_getmnt(p, v, retval) if ((error = copyin((caddr_t)SCARG(uap, start), &start, sizeof(*SCARG(uap, start)))) != 0) goto bad; - simple_lock(&mountlist_slock); for (skip = start, mp = mountlist.cqh_first; mp != (void*)&mountlist && skip-- > 0; mp = nmp) nmp = mp->mnt_list.cqe_next; - simple_unlock(&mountlist_slock); } - simple_lock(&mountlist_slock); for (count = 0, mp = mountlist.cqh_first; mp != (void*)&mountlist && count < maxcount; mp = nmp) { - if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock)) { - nmp = mp->mnt_list.cqe_next; - continue; - } - if (sfsp != NULL) { + nmp = mp->mnt_list.cqe_next; + if (sfsp != NULL && (mp->mnt_flag & MNT_MLOCK) == 0) { struct ultrix_fs_data tem; sp = &mp->mnt_stat; /* * If requested, refresh the fsstat cache. */ - if (mntflags != MNT_WAIT && + if ((mntflags & MNT_WAIT) != 0 && (error = VFS_STATFS(mp, sp, p)) != 0) continue; @@ -286,11 +277,7 @@ ultrix_sys_getmnt(p, v, retval) count++; } } - simple_lock(&mountlist_slock); - nmp = mp->mnt_list.cqe_next; - vfs_unbusy(mp); } - simple_unlock(&mountlist_slock); if (sfsp != NULL && count > maxcount) *retval = maxcount;