Remove calls to now obsolete vn_start_write() and vn_finished_write().
This commit is contained in:
parent
4b4de5fa3f
commit
e956461048
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_fcntl.c,v 1.55 2007/03/04 06:01:32 christos Exp $ */
|
||||
/* $NetBSD: svr4_fcntl.c,v 1.56 2007/04/07 15:06:53 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_fcntl.c,v 1.55 2007/03/04 06:01:32 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_fcntl.c,v 1.56 2007/04/07 15:06:53 hannken Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -263,7 +263,6 @@ fd_revoke(struct lwp *l, int fd, register_t *retval)
|
|||
struct filedesc *fdp = l->l_proc->p_fd;
|
||||
struct file *fp;
|
||||
struct vnode *vp;
|
||||
struct mount *mp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
||||
|
@ -289,11 +288,8 @@ fd_revoke(struct lwp *l, int fd, register_t *retval)
|
|||
KAUTH_GENERIC_ISSUSER, NULL)) != 0)
|
||||
goto out;
|
||||
|
||||
if ((error = vn_start_write(vp, &mp, V_WAIT | V_PCATCH)) != 0)
|
||||
goto out;
|
||||
if (vp->v_usecount > 1 || (vp->v_flag & VALIASED))
|
||||
VOP_REVOKE(vp, REVOKEALL);
|
||||
vn_finished_write(mp, 0);
|
||||
out:
|
||||
vrele(vp);
|
||||
return error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_32_fcntl.c,v 1.18 2007/03/16 22:21:42 dsl Exp $ */
|
||||
/* $NetBSD: svr4_32_fcntl.c,v 1.19 2007/04/07 15:06:53 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_fcntl.c,v 1.18 2007/03/16 22:21:42 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_fcntl.c,v 1.19 2007/04/07 15:06:53 hannken Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -266,7 +266,6 @@ fd_revoke(l, fd, retval)
|
|||
struct filedesc *fdp = l->l_proc->p_fd;
|
||||
struct file *fp;
|
||||
struct vnode *vp;
|
||||
struct mount *mp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
||||
|
@ -291,11 +290,8 @@ fd_revoke(l, fd, retval)
|
|||
KAUTH_GENERIC_ISSUSER, NULL)) != 0)
|
||||
goto out;
|
||||
|
||||
if ((error = vn_start_write(vp, &mp, V_WAIT | V_PCATCH)) != 0)
|
||||
goto out;
|
||||
if (vp->v_usecount > 1 || (vp->v_flag & VALIASED))
|
||||
VOP_REVOKE(vp, REVOKEALL);
|
||||
vn_finished_write(mp, 0);
|
||||
out:
|
||||
vrele(vp);
|
||||
return error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vnd.c,v 1.166 2007/03/12 18:18:30 ad Exp $ */
|
||||
/* $NetBSD: vnd.c,v 1.167 2007/04/07 15:07:26 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -137,7 +137,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.166 2007/03/12 18:18:30 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.167 2007/04/07 15:07:26 hannken Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "fs_nfs.h"
|
||||
|
@ -727,20 +727,15 @@ handle_with_strategy(struct vnd_softc *vnd, const struct buf *obp,
|
|||
int bsize, error, flags, skipped;
|
||||
size_t resid, sz;
|
||||
off_t bn, offset;
|
||||
struct mount *mp;
|
||||
|
||||
flags = obp->b_flags;
|
||||
|
||||
mp = NULL;
|
||||
if (!(flags & B_READ)) {
|
||||
int s;
|
||||
|
||||
s = splbio();
|
||||
V_INCR_NUMOUTPUT(bp->b_vp);
|
||||
splx(s);
|
||||
|
||||
vn_start_write(vnd->sc_vp, &mp, V_WAIT);
|
||||
KASSERT(mp != NULL);
|
||||
}
|
||||
|
||||
/* convert to a byte offset within the file. */
|
||||
|
@ -818,11 +813,6 @@ handle_with_strategy(struct vnd_softc *vnd, const struct buf *obp,
|
|||
bn += sz;
|
||||
}
|
||||
nestiobuf_done(bp, skipped, error);
|
||||
|
||||
if (!(flags & B_READ)) {
|
||||
KASSERT(mp != NULL);
|
||||
vn_finished_write(mp, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: union_subr.c,v 1.24 2007/02/04 15:03:20 chs Exp $ */
|
||||
/* $NetBSD: union_subr.c,v 1.25 2007/04/07 15:08:12 hannken Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994
|
||||
|
@ -72,7 +72,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.24 2007/02/04 15:03:20 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.25 2007/04/07 15:08:12 hannken Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -693,17 +693,12 @@ union_copyup(un, docopy, cred, l)
|
|||
struct lwp *l;
|
||||
{
|
||||
int error;
|
||||
struct mount *mp;
|
||||
struct vnode *lvp, *uvp;
|
||||
struct vattr lvattr, uvattr;
|
||||
|
||||
if ((error = vn_start_write(un->un_dirvp, &mp, V_WAIT | V_PCATCH)) != 0)
|
||||
return (error);
|
||||
error = union_vn_create(&uvp, un, l);
|
||||
if (error) {
|
||||
vn_finished_write(mp, 0);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
|
||||
/* at this point, uppervp is locked */
|
||||
union_newupper(un, uvp);
|
||||
|
@ -739,7 +734,6 @@ union_copyup(un, docopy, cred, l)
|
|||
#endif
|
||||
|
||||
}
|
||||
vn_finished_write(mp, 0);
|
||||
union_vn_close(uvp, FWRITE, cred, l);
|
||||
|
||||
/*
|
||||
|
@ -842,16 +836,12 @@ union_mkshadow(um, dvp, cnp, vpp)
|
|||
struct vattr va;
|
||||
struct lwp *l = cnp->cn_lwp;
|
||||
struct componentname cn;
|
||||
struct mount *mp;
|
||||
|
||||
if ((error = vn_start_write(dvp, &mp, V_WAIT | V_PCATCH)) != 0)
|
||||
return (error);
|
||||
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
error = union_relookup(um, dvp, vpp, cnp, &cn,
|
||||
cnp->cn_nameptr, cnp->cn_namelen);
|
||||
if (error) {
|
||||
VOP_UNLOCK(dvp, 0);
|
||||
vn_finished_write(mp, 0);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -860,7 +850,6 @@ union_mkshadow(um, dvp, cnp, vpp)
|
|||
if (dvp != *vpp)
|
||||
VOP_UNLOCK(dvp, 0);
|
||||
vput(*vpp);
|
||||
vn_finished_write(mp, 0);
|
||||
*vpp = NULLVP;
|
||||
return (EEXIST);
|
||||
}
|
||||
|
@ -882,7 +871,6 @@ union_mkshadow(um, dvp, cnp, vpp)
|
|||
|
||||
vref(dvp);
|
||||
error = VOP_MKDIR(dvp, vpp, &cn, &va);
|
||||
vn_finished_write(mp, 0);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -906,24 +894,18 @@ union_mkwhiteout(um, dvp, cnp, path)
|
|||
struct lwp *l = cnp->cn_lwp;
|
||||
struct vnode *wvp;
|
||||
struct componentname cn;
|
||||
struct mount *mp;
|
||||
|
||||
VOP_UNLOCK(dvp, 0);
|
||||
if ((error = vn_start_write(dvp, &mp, V_WAIT | V_PCATCH)) != 0)
|
||||
return (error);
|
||||
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
error = union_relookup(um, dvp, &wvp, cnp, &cn, path, strlen(path));
|
||||
if (error) {
|
||||
vn_finished_write(mp, 0);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
|
||||
if (wvp) {
|
||||
VOP_ABORTOP(dvp, &cn);
|
||||
if (dvp != wvp)
|
||||
VOP_UNLOCK(dvp, 0);
|
||||
vput(wvp);
|
||||
vn_finished_write(mp, 0);
|
||||
return (EEXIST);
|
||||
}
|
||||
|
||||
|
@ -934,8 +916,6 @@ union_mkwhiteout(um, dvp, cnp, path)
|
|||
if (error)
|
||||
VOP_ABORTOP(dvp, &cn);
|
||||
|
||||
vn_finished_write(mp, 0);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sync_subr.c,v 1.28 2007/02/09 21:55:36 ad Exp $ */
|
||||
/* $NetBSD: sync_subr.c,v 1.29 2007/04/07 15:08:12 hannken Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Marshall Kirk McKusick. All Rights Reserved.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sync_subr.c,v 1.28 2007/02/09 21:55:36 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sync_subr.c,v 1.29 2007/04/07 15:08:12 hannken Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -167,7 +167,6 @@ sched_sync(void *v)
|
|||
{
|
||||
struct synclist *slp;
|
||||
struct vnode *vp;
|
||||
struct mount *mp;
|
||||
long starttime;
|
||||
int s;
|
||||
|
||||
|
@ -190,14 +189,10 @@ sched_sync(void *v)
|
|||
mutex_enter(&syncer_mutex);
|
||||
|
||||
while ((vp = TAILQ_FIRST(slp)) != NULL) {
|
||||
if (vn_start_write(vp, &mp, V_NOWAIT) == 0) {
|
||||
if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT)
|
||||
== 0) {
|
||||
(void) VOP_FSYNC(vp, curlwp->l_cred,
|
||||
FSYNC_LAZY, 0, 0, curlwp);
|
||||
VOP_UNLOCK(vp, 0);
|
||||
}
|
||||
vn_finished_write(mp, 0);
|
||||
if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT) == 0) {
|
||||
(void) VOP_FSYNC(vp, curlwp->l_cred,
|
||||
FSYNC_LAZY, 0, 0, curlwp);
|
||||
VOP_UNLOCK(vp, 0);
|
||||
}
|
||||
s = splbio();
|
||||
if (TAILQ_FIRST(slp) == vp) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sync_vnops.c,v 1.16 2006/11/16 01:33:38 christos Exp $ */
|
||||
/* $NetBSD: sync_vnops.c,v 1.17 2007/04/07 15:08:12 hannken Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Marshall Kirk McKusick. All Rights Reserved.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sync_vnops.c,v 1.16 2006/11/16 01:33:38 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sync_vnops.c,v 1.17 2007/04/07 15:08:12 hannken Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -155,16 +155,11 @@ sync_fsync(v)
|
|||
*/
|
||||
simple_lock(&mountlist_slock);
|
||||
if (vfs_busy(mp, LK_NOWAIT, &mountlist_slock) == 0) {
|
||||
if (vn_start_write(NULL, &mp, V_NOWAIT) != 0) {
|
||||
vfs_unbusy(mp);
|
||||
return (0);
|
||||
}
|
||||
asyncflag = mp->mnt_flag & MNT_ASYNC;
|
||||
mp->mnt_flag &= ~MNT_ASYNC;
|
||||
VFS_SYNC(mp, MNT_LAZY, ap->a_cred, ap->a_l);
|
||||
if (asyncflag)
|
||||
mp->mnt_flag |= MNT_ASYNC;
|
||||
vn_finished_write(mp, 0);
|
||||
vfs_unbusy(mp);
|
||||
} else
|
||||
simple_unlock(&mountlist_slock);
|
||||
|
|
Loading…
Reference in New Issue