summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/common/vfs_syscalls_25.c4
-rw-r--r--sys/compat/freebsd/freebsd_file.c4
-rw-r--r--sys/compat/netbsd/netbsd_file.c4
-rw-r--r--sys/kern/vfs_lookup.c4
-rw-r--r--sys/kern/vfs_subr.c14
-rw-r--r--sys/kern/vfs_sync.c4
-rw-r--r--sys/kern/vfs_syscalls.c14
-rw-r--r--sys/nfs/nfs_syscalls.c4
-rw-r--r--sys/sys/mount.h6
-rw-r--r--sys/ufs/mfs/mfs_vfsops.c4
-rw-r--r--sys/ufs/ufs/ufs_quota.c4
-rw-r--r--sys/xfs/xfs_dev-common.c2
12 files changed, 34 insertions, 34 deletions
diff --git a/sys/compat/common/vfs_syscalls_25.c b/sys/compat/common/vfs_syscalls_25.c
index f017af71580..7ba3eeca7a4 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.11 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: vfs_syscalls_25.c,v 1.12 2006/06/25 15:01:53 sturm Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -181,7 +181,7 @@ compat_25_sys_getfsstat(p, v, retval)
for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE)) {
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
continue;
}
diff --git a/sys/compat/freebsd/freebsd_file.c b/sys/compat/freebsd/freebsd_file.c
index 46f0e69e051..b852c348cac 100644
--- a/sys/compat/freebsd/freebsd_file.c
+++ b/sys/compat/freebsd/freebsd_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: freebsd_file.c,v 1.24 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: freebsd_file.c,v 1.25 2006/06/25 15:01:53 sturm Exp $ */
/* $NetBSD: freebsd_file.c,v 1.3 1996/05/03 17:03:09 christos Exp $ */
/*
@@ -660,7 +660,7 @@ freebsd_sys_getfsstat(p, v, retval)
for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE)) {
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
continue;
}
diff --git a/sys/compat/netbsd/netbsd_file.c b/sys/compat/netbsd/netbsd_file.c
index d7e3b0bd20d..6fecfca8710 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.10 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: netbsd_file.c,v 1.11 2006/06/25 15:01:53 sturm Exp $ */
/* $NetBSD: freebsd_file.c,v 1.3 1996/05/03 17:03:09 christos Exp $ */
/*
@@ -634,7 +634,7 @@ netbsd_sys_getfsstat(p, v, retval)
for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE)) {
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
continue;
}
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index eb26ef1c7a6..090e92ad34e 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_lookup.c,v 1.34 2006/06/23 22:20:39 sturm Exp $ */
+/* $OpenBSD: vfs_lookup.c,v 1.35 2006/06/25 15:01:53 sturm Exp $ */
/* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */
/*
@@ -515,7 +515,7 @@ dirloop:
*/
while (dp->v_type == VDIR && (mp = dp->v_mountedhere) &&
(cnp->cn_flags & NOCROSSMOUNT) == 0) {
- if (vfs_busy(mp, VB_READ|VB_UMWAIT))
+ if (vfs_busy(mp, VB_READ|VB_WAIT))
continue;
VOP_UNLOCK(dp, 0, p);
error = VFS_ROOT(mp, &tdp);
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 88458c67924..71e8e0c0ba8 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.128 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.129 2006/06/25 15:01:53 sturm Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -162,7 +162,7 @@ vfs_busy(struct mount *mp, int flags)
else
rwflags |= RW_READ;
- if (flags & VB_UMWAIT)
+ if (flags & VB_WAIT)
rwflags |= RW_SLEEPFAIL;
else
rwflags |= RW_NOSLEEP;
@@ -210,7 +210,7 @@ vfs_rootmountalloc(char *fstypename, char *devname, struct mount **mpp)
return (ENODEV);
mp = malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
bzero((char *)mp, (u_long)sizeof(struct mount));
- (void) vfs_busy(mp, VB_READ|VB_UMIGNORE);
+ (void) vfs_busy(mp, VB_READ|VB_NOWAIT);
LIST_INIT(&mp->mnt_vnodelist);
mp->mnt_vfc = vfsp;
mp->mnt_op = vfsp->vfc_vfsops;
@@ -1162,7 +1162,7 @@ vgonel(struct vnode *vp, struct proc *p)
*/
mp = vp->v_specmountpoint;
if (mp != NULL) {
- if (!vfs_busy(mp, VB_WRITE|VB_UMWAIT)) {
+ if (!vfs_busy(mp, VB_WRITE|VB_WAIT)) {
flags = MNT_FORCE | MNT_DOOMED;
dounmount(mp, flags, p, NULL);
}
@@ -1329,7 +1329,7 @@ printlockedvnodes(void)
for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE)) {
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
continue;
}
@@ -1416,7 +1416,7 @@ sysctl_vnode(char *where, size_t *sizep, struct proc *p)
for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE)) {
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
continue;
}
@@ -1717,7 +1717,7 @@ vfs_unmountall(void)
for (mp = CIRCLEQ_LAST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
nmp = CIRCLEQ_PREV(mp, mnt_list);
- if ((vfs_busy(mp, VB_WRITE|VB_UMIGNORE)) != 0)
+ if ((vfs_busy(mp, VB_WRITE|VB_NOWAIT)) != 0)
continue;
if ((error = dounmount(mp, MNT_FORCE, curproc, NULL)) != 0) {
printf("unmount of %s failed with error %d\n",
diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c
index 8694baa5c39..d5ef18aa185 100644
--- a/sys/kern/vfs_sync.c
+++ b/sys/kern/vfs_sync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_sync.c,v 1.40 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: vfs_sync.c,v 1.41 2006/06/25 15:01:54 sturm Exp $ */
/*
* Portions of this code are:
@@ -353,7 +353,7 @@ sync_fsync(void *v)
* Walk the list of vnodes pushing all that are dirty and
* not already on the sync list.
*/
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE) == 0) {
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT) == 0) {
asyncflag = mp->mnt_flag & MNT_ASYNC;
mp->mnt_flag &= ~MNT_ASYNC;
VFS_SYNC(mp, MNT_LAZY, ap->a_cred, ap->a_p);
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index fc4ae8e5ef3..27c06b5ed8e 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.136 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.137 2006/06/25 15:01:54 sturm Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -150,7 +150,7 @@ sys_mount(struct proc *p, void *v, register_t *retval)
if (flag & MNT_NOEXEC)
SCARG(uap, flags) |= MNT_NOEXEC;
}
- if ((error = vfs_busy(mp, VB_READ|VB_UMIGNORE)) != 0) {
+ if ((error = vfs_busy(mp, VB_READ|VB_NOWAIT)) != 0) {
vput(vp);
return (error);
}
@@ -236,7 +236,7 @@ sys_mount(struct proc *p, void *v, register_t *retval)
mp = (struct mount *)malloc((u_long)sizeof(struct mount),
M_MOUNT, M_WAITOK);
bzero((char *)mp, (u_long)sizeof(struct mount));
- (void) vfs_busy(mp, VB_READ|VB_UMIGNORE);
+ (void) vfs_busy(mp, VB_READ|VB_NOWAIT);
mp->mnt_op = vfsp->vfc_vfsops;
mp->mnt_vfc = vfsp;
mp->mnt_flag |= (vfsp->vfc_flags & MNT_VISFLAGMASK);
@@ -402,7 +402,7 @@ sys_unmount(struct proc *p, void *v, register_t *retval)
}
vput(vp);
- if (vfs_busy(mp, VB_WRITE|VB_UMWAIT))
+ if (vfs_busy(mp, VB_WRITE|VB_WAIT))
return (EBUSY);
return (dounmount(mp, SCARG(uap, flags), p, vp));
@@ -471,7 +471,7 @@ sys_sync(struct proc *p, void *v, register_t *retval)
for (mp = CIRCLEQ_LAST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE)) {
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
nmp = CIRCLEQ_PREV(mp, mnt_list);
continue;
}
@@ -626,7 +626,7 @@ sys_getfsstat(struct proc *p, void *v, register_t *retval)
for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE)) {
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
nmp = CIRCLEQ_NEXT(mp, mnt_list);
continue;
}
@@ -702,7 +702,7 @@ sys_fchdir(struct proc *p, void *v, register_t *retval)
error = VOP_ACCESS(vp, VEXEC, p->p_ucred, p);
while (!error && (mp = vp->v_mountedhere) != NULL) {
- if (vfs_busy(mp, VB_READ|VB_UMWAIT))
+ if (vfs_busy(mp, VB_READ|VB_WAIT))
continue;
error = VFS_ROOT(mp, &tdp);
vfs_unbusy(mp);
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c
index e6156abe717..e467714cefc 100644
--- a/sys/nfs/nfs_syscalls.c
+++ b/sys/nfs/nfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_syscalls.c,v 1.47 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: nfs_syscalls.c,v 1.48 2006/06/25 15:01:54 sturm Exp $ */
/* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */
/*
@@ -177,7 +177,7 @@ nfs_clientd(struct nfsmount *nmp, struct ucred *cred, struct nfsd_cargs *ncd,
error = tsleep((caddr_t)&nmp->nm_authstr, PSOCK | PCATCH,
"nqnfstimr", hz / 3);
if (error == EINTR || error == ERESTART) {
- if (vfs_busy(nmp->nm_mountp, VB_WRITE|VB_UMWAIT) == 0)
+ if (vfs_busy(nmp->nm_mountp, VB_WRITE|VB_WAIT) == 0)
dounmount(nmp->nm_mountp, MNT_FORCE, p, NULL);
}
}
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 153b4e20dee..981bef28436 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount.h,v 1.72 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: mount.h,v 1.73 2006/06/25 15:01:54 sturm Exp $ */
/* $NetBSD: mount.h,v 1.48 1996/02/18 11:55:47 fvdl Exp $ */
/*
@@ -566,8 +566,8 @@ struct netexport {
int vfs_busy(struct mount *, int);
#define VB_READ 0x01
#define VB_WRITE 0x02
-#define VB_UMIGNORE 0x04 /* ignore unmount in progress */
-#define VB_UMWAIT 0x08 /* wait for unmount to finish */
+#define VB_NOWAIT 0x04 /* immediately fail on busy lock */
+#define VB_WAIT 0x08 /* sleep fail on busy lock */
int vfs_isbusy(struct mount *);
int vfs_mount_foreach_vnode(struct mount *, int (*func)(struct vnode *,
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c
index 6c20f2834a6..eec5af19639 100644
--- a/sys/ufs/mfs/mfs_vfsops.c
+++ b/sys/ufs/mfs/mfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfs_vfsops.c,v 1.33 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: mfs_vfsops.c,v 1.34 2006/06/25 15:01:54 sturm Exp $ */
/* $NetBSD: mfs_vfsops.c,v 1.10 1996/02/09 22:31:28 christos Exp $ */
/*
@@ -263,7 +263,7 @@ mfs_start(struct mount *mp, int flags, struct proc *p)
* EINTR/ERESTART.
*/
if (sleepreturn != 0) {
- if (vfs_busy(mp, VB_WRITE|VB_UMIGNORE) ||
+ if (vfs_busy(mp, VB_WRITE|VB_NOWAIT) ||
dounmount(mp, 0, p, NULL))
CLRSIG(p, CURSIG(p));
sleepreturn = 0;
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index c1736332089..460c3e6e2b9 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_quota.c,v 1.24 2006/06/14 20:01:50 sturm Exp $ */
+/* $OpenBSD: ufs_quota.c,v 1.25 2006/06/25 15:01:54 sturm Exp $ */
/* $NetBSD: ufs_quota.c,v 1.8 1996/02/09 22:36:09 christos Exp $ */
/*
@@ -1028,7 +1028,7 @@ ufs_quotactl(struct mount *mp, int cmds, uid_t uid, caddr_t arg,
if ((u_int)type >= MAXQUOTAS)
return (EINVAL);
- if (vfs_busy(mp, VB_READ|VB_UMIGNORE))
+ if (vfs_busy(mp, VB_READ|VB_NOWAIT))
return (0);
diff --git a/sys/xfs/xfs_dev-common.c b/sys/xfs/xfs_dev-common.c
index 55100533536..88338bde49a 100644
--- a/sys/xfs/xfs_dev-common.c
+++ b/sys/xfs/xfs_dev-common.c
@@ -180,7 +180,7 @@ xfs_devclose_common(dev_t dev, d_thread_t *proc)
*/
if (xfs[minor(dev)].mp != NULL) {
- if (xfs_vfs_busy(xfs[minor(dev)].mp, VB_READ|VB_UMWAIT, NULL, proc)) {
+ if (xfs_vfs_busy(xfs[minor(dev)].mp, VB_READ|VB_WAIT, NULL, proc)) {
NNPFSDEB(XDEBNODE, ("xfs_dev_close: vfs_busy() --> BUSY\n"));
return EBUSY;
}