diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-08-17 22:19:07 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-08-17 22:19:07 +0000 |
commit | 5fc0ef81be55e340c018e51d4c1aaa8f8783499c (patch) | |
tree | 2a64e45d387f18432cea54d6846c4798e9ee991d | |
parent | d857d0caa90f18bcd0f4f2dc97366e0656bfd2b7 (diff) |
Fix turd left over from soft updates patch.
MNT_LAZY is not a bit flag.
-rw-r--r-- | sys/kern/vfs_syscalls.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 5efcddd5b88..1fe47820cff 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.43 1998/07/13 05:43:10 csapuntz Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.44 1998/08/17 22:19:06 csapuntz Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -630,6 +630,7 @@ sys_getfsstat(p, v, retval) caddr_t sfsp; long count, maxcount, error; struct statfs sb; + int flags = SCARG(uap, flags); maxcount = SCARG(uap, bufsize) / sizeof(struct statfs); sfsp = (caddr_t)SCARG(uap, buf); @@ -642,19 +643,16 @@ sys_getfsstat(p, v, retval) } if (sfsp && count < maxcount) { sp = &mp->mnt_stat; - /* - * If MNT_NOWAIT or MNT_LAZY is specified, do not - * refresh the fsstat cache. MNT_NOWAIT or MNT_LAZY - * overrides MNT_WAIT. - */ - if (((SCARG(uap, flags) & (MNT_LAZY|MNT_NOWAIT)) == 0 || - (SCARG(uap, flags) & MNT_WAIT)) && + + /* Refresh stats unless MNT_NOWAIT is specified */ + if ((flags != MNT_NOWAIT) && (error = VFS_STATFS(mp, sp, p))) { simple_lock(&mountlist_slock); nmp = mp->mnt_list.cqe_next; vfs_unbusy(mp, p); continue; } + sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; if (suser(p->p_ucred, &p->p_acflag)) { bcopy((caddr_t)sp, (caddr_t)&sb, sizeof(sb)); |