summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1996-01-16 13:07:14 +0000
committerDavid Greenman <dg@FreeBSD.org>1996-01-16 13:07:14 +0000
commitc128d2157b4db2986deb442a68277f47091f1630 (patch)
treebe5eb1adedb354f6a7a4abedc890625492e79ad6 /sys/kern/vfs_syscalls.c
parent5ce1b6a98e7d2df29862c043abb05e40a92f3b17 (diff)
downloadsrc-test2-c128d2157b4db2986deb442a68277f47091f1630.tar.gz
src-test2-c128d2157b4db2986deb442a68277f47091f1630.zip
Notes
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 88231fe115de..945b30094c7a 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.44 1995/12/17 21:23:22 phk Exp $
+ * $Id: vfs_syscalls.c,v 1.45 1996/01/05 17:46:14 wollman Exp $
*/
/*
@@ -486,7 +486,10 @@ getfsstat(p, uap, retval)
sfsp = (caddr_t)uap->buf;
count = 0;
for (mp = mountlist.cqh_first; mp != (void *)&mountlist; mp = nmp) {
- nmp = mp->mnt_list.cqe_next;
+ if (vfs_busy(mp)) {
+ nmp = mp->mnt_list.cqe_next;
+ continue;
+ }
if (sfsp && count < maxcount &&
((mp->mnt_flag & MNT_MLOCK) == 0)) {
sp = &mp->mnt_stat;
@@ -496,15 +499,22 @@ getfsstat(p, uap, retval)
*/
if (((uap->flags & MNT_NOWAIT) == 0 ||
(uap->flags & MNT_WAIT)) &&
- (error = VFS_STATFS(mp, sp, p)))
+ (error = VFS_STATFS(mp, sp, p))) {
+ nmp = mp->mnt_list.cqe_next;
+ vfs_unbusy(mp);
continue;
+ }
sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
error = copyout((caddr_t)sp, sfsp, sizeof(*sp));
- if (error)
+ if (error) {
+ vfs_unbusy(mp);
return (error);
+ }
sfsp += sizeof(*sp);
}
count++;
+ nmp = mp->mnt_list.cqe_next;
+ vfs_unbusy(mp);
}
if (sfsp && count > maxcount)
*retval = maxcount;