diff options
author | Nikolay Sturm <sturm@cvs.openbsd.org> | 2006-04-30 14:20:09 +0000 |
---|---|---|
committer | Nikolay Sturm <sturm@cvs.openbsd.org> | 2006-04-30 14:20:09 +0000 |
commit | a4cb7d48e5f539c9c6c8918d25916b5fac8dcd8a (patch) | |
tree | f86b662368f0d39c80089283db45fbc7db35c09f /sys/kern | |
parent | dba3801a71db41c05ec0bfd759e004548d5e3eca (diff) |
remove the simplelock argument from vfs_busy() which is currently not
used and will never be used this way in VFS
requested by and ok pedro, ok krw, biorn
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_lookup.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 18 | ||||
-rw-r--r-- | sys/kern/vfs_sync.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 14 |
4 files changed, 19 insertions, 21 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 756b532bceb..37b2ffe0fe8 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lookup.c,v 1.31 2005/11/30 10:35:07 pedro Exp $ */ +/* $OpenBSD: vfs_lookup.c,v 1.32 2006/04/30 14:20:07 sturm Exp $ */ /* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */ /* @@ -513,7 +513,7 @@ dirloop: */ while (dp->v_type == VDIR && (mp = dp->v_mountedhere) && (cnp->cn_flags & NOCROSSMOUNT) == 0) { - if (vfs_busy(mp, 0, NULL)) + if (vfs_busy(mp, 0)) 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 ffb178d5a3a..1f2220da18c 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.123 2006/04/19 11:55:55 pedro Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.124 2006/04/30 14:20:07 sturm Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -152,7 +152,7 @@ vntblinit(void) * fail. */ int -vfs_busy(struct mount *mp, int flags, struct simplelock *interlkp) +vfs_busy(struct mount *mp, int flags) { int lkflags; @@ -173,9 +173,7 @@ vfs_busy(struct mount *mp, int flags, struct simplelock *interlkp) */ lkflags |= LK_SLEEPFAIL; - if (interlkp) - lkflags |= LK_INTERLOCK; - if (lockmgr(&mp->mnt_lock, lkflags, interlkp)) + if (lockmgr(&mp->mnt_lock, lkflags, NULL)) return (ENOENT); return (0); } @@ -215,7 +213,7 @@ vfs_rootmountalloc(char *fstypename, char *devname, struct mount **mpp) mp = malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK); bzero((char *)mp, (u_long)sizeof(struct mount)); lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, 0); - (void)vfs_busy(mp, LK_NOWAIT, NULL); + (void)vfs_busy(mp, LK_NOWAIT); LIST_INIT(&mp->mnt_vnodelist); mp->mnt_vfc = vfsp; mp->mnt_op = vfsp->vfc_vfsops; @@ -1166,7 +1164,7 @@ vgonel(struct vnode *vp, struct proc *p) */ mp = vp->v_specmountpoint; if (mp != NULL) { - if (!vfs_busy(mp, LK_EXCLUSIVE, NULL)) { + if (!vfs_busy(mp, LK_EXCLUSIVE)) { flags = MNT_FORCE | MNT_DOOMED; dounmount(mp, flags, p, NULL); } @@ -1333,7 +1331,7 @@ printlockedvnodes(void) for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist); mp = nmp) { - if (vfs_busy(mp, LK_NOWAIT, NULL)) { + if (vfs_busy(mp, LK_NOWAIT)) { nmp = CIRCLEQ_NEXT(mp, mnt_list); continue; } @@ -1411,7 +1409,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, LK_NOWAIT, NULL)) { + if (vfs_busy(mp, LK_NOWAIT)) { nmp = CIRCLEQ_NEXT(mp, mnt_list); continue; } @@ -1712,7 +1710,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, LK_EXCLUSIVE|LK_NOWAIT, NULL)) != 0) + if ((vfs_busy(mp, LK_EXCLUSIVE|LK_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 89367839c17..6068ff5473e 100644 --- a/sys/kern/vfs_sync.c +++ b/sys/kern/vfs_sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_sync.c,v 1.38 2006/04/19 11:55:55 pedro Exp $ */ +/* $OpenBSD: vfs_sync.c,v 1.39 2006/04/30 14:20:07 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, LK_NOWAIT, NULL) == 0) { + if (vfs_busy(mp, LK_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 ce7965e8ac0..40f6ddc223d 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.133 2006/04/19 11:55:55 pedro Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.134 2006/04/30 14:20:07 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, LK_NOWAIT, NULL)) != 0) { + if ((error = vfs_busy(mp, LK_NOWAIT)) != 0) { vput(vp); return (error); } @@ -238,7 +238,7 @@ sys_mount(struct proc *p, void *v, register_t *retval) bzero((char *)mp, (u_long)sizeof(struct mount)); lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, 0); /* This error never happens, but it makes auditing easier */ - if ((error = vfs_busy(mp, LK_NOWAIT, NULL))) + if ((error = vfs_busy(mp, LK_NOWAIT))) return (error); mp->mnt_op = vfsp->vfc_vfsops; mp->mnt_vfc = vfsp; @@ -405,7 +405,7 @@ sys_unmount(struct proc *p, void *v, register_t *retval) } vput(vp); - if (vfs_busy(mp, LK_EXCLUSIVE, NULL)) + if (vfs_busy(mp, LK_EXCLUSIVE)) return (EBUSY); return (dounmount(mp, SCARG(uap, flags), p, vp)); @@ -474,7 +474,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, LK_NOWAIT, NULL)) { + if (vfs_busy(mp, LK_NOWAIT)) { nmp = CIRCLEQ_PREV(mp, mnt_list); continue; } @@ -629,7 +629,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, LK_NOWAIT, NULL)) { + if (vfs_busy(mp, LK_NOWAIT)) { nmp = CIRCLEQ_NEXT(mp, mnt_list); continue; } @@ -705,7 +705,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, 0, NULL)) + if (vfs_busy(mp, 0)) continue; error = VFS_ROOT(mp, &tdp); vfs_unbusy(mp); |