Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
This commit is contained in:
hannken 2010-06-24 12:58:48 +00:00
parent cd63900e30
commit 1423e65b26
149 changed files with 734 additions and 747 deletions

View File

@ -61,7 +61,7 @@ vdev_disk_flush(struct work *work, void *cookie)
cmd = 1;
error = VOP_IOCTL(vp, DIOCCACHESYNC, &cmd, FREAD|FWRITE,
kauth_cred_get());
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
bp->b_error = error;
vdev_disk_io_intr(bp);
}

View File

@ -526,11 +526,11 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
default:
error = ENOTSUP;
}
VOP_UNLOCK(ZTOV(dzp), 0);
VOP_UNLOCK(ZTOV(dzp));
out:
if (error == 0 && vp != NULL) {
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
VN_RELE(vp);
}
@ -569,7 +569,7 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap)
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LOOKUP(ZTOV(dzp), &vp, &cn);
if (error != 0) {
VOP_UNLOCK(ZTOV(dzp), 0);
VOP_UNLOCK(ZTOV(dzp));
goto fail;
}
@ -584,7 +584,7 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap)
error = ENOTSUP;
}
vput(vp);
VOP_UNLOCK(ZTOV(dzp), 0);
VOP_UNLOCK(ZTOV(dzp));
fail:
VN_RELE(ZTOV(dzp));
@ -620,8 +620,8 @@ zfs_replay_link(zfsvfs_t *zfsvfs, lr_link_t *lr, boolean_t byteswap)
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
vn_lock(ZTOV(zp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LINK(ZTOV(dzp), ZTOV(zp), &cn /*,vflg*/);
VOP_UNLOCK(ZTOV(zp), 0);
VOP_UNLOCK(ZTOV(dzp), 0);
VOP_UNLOCK(ZTOV(zp));
VOP_UNLOCK(ZTOV(dzp));
VN_RELE(ZTOV(zp));
VN_RELE(ZTOV(dzp));
@ -664,10 +664,10 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
scn.cn_cred = kcred;
vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY);
error = VOP_LOOKUP(ZTOV(sdzp), &svp, &scn);
VOP_UNLOCK(ZTOV(sdzp), 0);
VOP_UNLOCK(ZTOV(sdzp));
if (error != 0)
goto fail;
VOP_UNLOCK(svp, 0);
VOP_UNLOCK(svp);
tcn.cn_nameptr = tname;
tcn.cn_namelen = strlen(tname);
@ -680,7 +680,7 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
if (error == EJUSTRETURN)
tvp = NULL;
else if (error != 0) {
VOP_UNLOCK(ZTOV(tdzp), 0);
VOP_UNLOCK(ZTOV(tdzp));
goto fail;
}
@ -857,7 +857,7 @@ zfs_replay_setattr(zfsvfs_t *zfsvfs, lr_setattr_t *lr, boolean_t byteswap)
vp = ZTOV(zp);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_SETATTR(vp, vap, kcred);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
zfs_fuid_info_free(zfsvfs->z_fuid_replay);
zfsvfs->z_fuid_replay = NULL;

View File

@ -1347,7 +1347,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp,
if (cnp->cn_flags & ISDOTDOT) {
ltype = VOP_ISLOCKED(dvp);
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
}
error = vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
if (cnp->cn_flags & ISDOTDOT)
@ -5281,7 +5281,7 @@ zfs_netbsd_inactive(struct vop_inactive_args *ap)
* vrele() will call us again.
*/
*ap->a_recycle = (zp->z_unlinked != 0);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (0);
}

View File

@ -997,7 +997,7 @@ again:
vp = ZTOV(zp);
genfs_node_init(vp, &zfs_genfsops);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
err = 0;
} else {

View File

@ -521,7 +521,7 @@ zvol_create_minor(const char *name)
struct stat sb;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = vn_stat(vp, &sb);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (error == 0) {
minor = getminor(sb.st_rdev);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: policy.c,v 1.1 2009/08/07 20:57:57 haad Exp $ */
/* $NetBSD: policy.c,v 1.2 2010/06/24 13:03:05 hannken Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@ -147,7 +147,7 @@ secpolicy_vnode_access(kauth_cred_t cred, struct vnode *vp, uint64_t owner,
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_ACCESS(vp, mode, cred);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs.c,v 1.2 2009/10/11 10:54:52 haad Exp $ */
/* $NetBSD: vfs.c,v 1.3 2010/06/24 13:03:05 hannken Exp $ */
/*-
* Copyright (c) 2006-2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
@ -268,7 +268,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
*/
vn_lock(vp, LK_SHARED | LK_RETRY);
mp = vfs_mount_alloc(vp, vfsp, fspath, td);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
mp->mnt_optnew = NULL;
vfs_setmntopt(mp, "from", fspec, 0);
@ -334,7 +334,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
panic("mount: lost mount");
mountcheckdirs(vp, mvp);
vput(mvp);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if ((mp->mnt_flag & MNT_RDONLY) == 0)
error = vfs_allocate_syncvnode(mp);
vfs_unbusy(mp, td);
@ -346,7 +346,7 @@ domount(kthread_t *td, vnode_t *vp, const char *fstype, char *fspath,
simple_lock(&vp->v_interlock);
vp->v_iflag &= ~VI_MOUNT;
simple_unlock(&vp->v_interlock);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
vfs_unbusy(mp, td);
vfs_mount_destroy(mp);
}

View File

@ -1,5 +1,5 @@
/* $NetBSD: vnode.h,v 1.4 2010/02/28 14:45:47 haad Exp $ */
/* $NetBSD: vnode.h,v 1.5 2010/06/24 13:03:05 hannken Exp $ */
/*
* CDDL HEADER START
@ -522,7 +522,7 @@ zfs_vn_open(const char *pnamep, enum uio_seg seg, int filemode, int createmode,
NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, pnamep);
error = vn_open(&nd, filemode, createmode);
if (error == 0) {
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
*vpp = nd.ni_vp;
}
return (error);
@ -566,7 +566,7 @@ zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(vp, cr, FSYNC_WAIT, 0, 0);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (error);
}
#define VOP_FSYNC(vp, flag, cr, unk) zfs_vop_fsync((vp), (flag), (cr))
@ -591,7 +591,7 @@ zfs_vop_getattr(vnode_t *vp, vattr_t *ap, int flag, cred_t *cr)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_GETATTR(vp, ap, cr);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (error);
}
#define VOP_GETATTR(vp, ap, flag, cr, unk) zfs_vop_getattr((vp), (ap), (flag), (cr))
@ -603,7 +603,7 @@ zfs_vop_seek(vnode_t *vp, off_t off, off_t *offp)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_SEEK(vp, off, *offp, kauth_cred_get());
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (error);
}
#define VOP_SEEK(vp, off, offp, unk) zfs_vop_seek(vp, off, offp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: p2k.c,v 1.40 2010/06/07 11:23:07 pooka Exp $ */
/* $NetBSD: p2k.c,v 1.41 2010/06/24 13:03:05 hannken Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@ -624,7 +624,7 @@ p2k_fs_fhtonode(struct puffs_usermount *pu, void *fid, size_t fidsize,
rv = rump_pub_vfs_fhtovp(mp, fid, &vp);
if (rv)
return rv;
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
p2n = getp2n(p2m, vp, false, NULL);
if (p2n == NULL)
@ -687,7 +687,7 @@ p2k_node_lookup(struct puffs_usermount *pu, puffs_cookie_t opc,
cn = makecn(pcn, 0);
RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE);
rv = RUMP_VOP_LOOKUP(dvp, &vp, cn);
RUMP_VOP_UNLOCK(dvp, 0);
RUMP_VOP_UNLOCK(dvp);
if (rump_pub_checksavecn(cn)) {
/*
* XXX the rename lookup protocol is currently horribly
@ -732,7 +732,7 @@ p2k_node_lookup(struct puffs_usermount *pu, puffs_cookie_t opc,
}
return rv;
}
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
p2n = getp2n(p2m, vp, false, NULL);
if (p2n == NULL) {
@ -826,7 +826,7 @@ do_makenode(struct puffs_usermount *pu, struct p2k_node *p2n_dir,
freecn(cn, 0);
if (rv == 0) {
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
p2n = getp2n(p2m, vp, true, p2n);
puffs_newinfo_setcookie(pni, p2n);
} else {
@ -871,7 +871,7 @@ p2k_node_open(struct puffs_usermount *pu, puffs_cookie_t opc, int mode,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_OPEN(vp, mode, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
return rv;
@ -888,7 +888,7 @@ p2k_node_close(struct puffs_usermount *pu, puffs_cookie_t opc, int flags,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
RUMP_VOP_CLOSE(vp, flags, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
return 0;
@ -906,7 +906,7 @@ p2k_node_access(struct puffs_usermount *pu, puffs_cookie_t opc, int mode,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_ACCESS(vp, mode, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
return rv;
@ -935,7 +935,7 @@ p2k_node_getattr(struct puffs_usermount *pu, puffs_cookie_t opc,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_GETATTR(vp, va_x, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
if (needcompat()) {
@ -965,7 +965,7 @@ p2k_node_setattr(struct puffs_usermount *pu, puffs_cookie_t opc,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_SETATTR(vp, va_x, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
UNDOCOMPAT(va_x);
@ -989,7 +989,7 @@ p2k_node_fsync(struct puffs_usermount *pu, puffs_cookie_t opc,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_FSYNC(vp, cred, flags, offlo, offhi);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
return rv;
@ -1022,7 +1022,7 @@ p2k_node_seek(struct puffs_usermount *pu, puffs_cookie_t opc,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_SEEK(vp, oldoff, newoff, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
return rv;
@ -1224,7 +1224,7 @@ p2k_node_readdir(struct puffs_usermount *pu, puffs_cookie_t opc,
} else {
rv = RUMP_VOP_READDIR(vp, uio, cred, eofflag, NULL, NULL);
}
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
if (rv == 0) {
*reslen = rump_pub_uio_getresid(uio);
*readoff = rump_pub_uio_getoff(uio);
@ -1249,7 +1249,7 @@ p2k_node_readlink(struct puffs_usermount *pu, puffs_cookie_t opc,
uio = rump_pub_uio_setup(linkname, *linklen, 0, RUMPUIO_READ);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_READLINK(vp, uio, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
*linklen -= rump_pub_uio_free(uio);
cred_destroy(cred);
@ -1271,7 +1271,7 @@ p2k_node_read(struct puffs_usermount *pu, puffs_cookie_t opc,
uio = rump_pub_uio_setup(buf, *resid, offset, RUMPUIO_READ);
RUMP_VOP_LOCK(vp, LK_SHARED);
rv = RUMP_VOP_READ(vp, uio, ioflag, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
*resid = rump_pub_uio_free(uio);
cred_destroy(cred);
@ -1297,7 +1297,7 @@ p2k_node_write(struct puffs_usermount *pu, puffs_cookie_t opc,
uio = rump_pub_uio_setup(buf, *resid, offset, RUMPUIO_WRITE);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_WRITE(vp, uio, ioflag, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
*resid = rump_pub_uio_free(uio);
cred_destroy(cred);
@ -1314,7 +1314,7 @@ p2k_node_pathconf(struct puffs_usermount *pu, puffs_cookie_t opc,
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_PATHCONF(vp, name, retval);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
return rv;
}
@ -1339,7 +1339,7 @@ p2k_node_getextattr(struct puffs_usermount *pu, puffs_cookie_t opc,
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_GETEXTATTR(vp, attrnamespace, attrname, uio,
attrsize, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
if (uio)
@ -1367,7 +1367,7 @@ p2k_node_setextattr(struct puffs_usermount *pu, puffs_cookie_t opc,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_SETEXTATTR(vp, attrnamespace, attrname, uio, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
if (uio)
@ -1395,7 +1395,7 @@ p2k_node_listextattr(struct puffs_usermount *pu, puffs_cookie_t opc,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_LISTEXTATTR(vp, attrnamespace, uio, attrsize, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
if (uio)
@ -1416,7 +1416,7 @@ p2k_node_deleteextattr(struct puffs_usermount *pu, puffs_cookie_t opc,
cred = cred_create(pcr);
RUMP_VOP_LOCK(vp, LK_EXCLUSIVE);
rv = RUMP_VOP_DELETEEXTATTR(vp, attrnamespace, attrname, cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
cred_destroy(cred);
return rv;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ukfs.c,v 1.50 2010/04/14 14:15:48 pooka Exp $ */
/* $NetBSD: ukfs.c,v 1.51 2010/06/24 13:03:05 hannken Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@ -753,7 +753,7 @@ ukfs_opendir(struct ukfs *ukfs, const char *dirname, struct ukfs_dircookie **c)
postcall(ukfs);
if (rv == 0) {
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
} else {
errno = rv;
rv = -1;
@ -776,7 +776,7 @@ getmydents(struct vnode *vp, off_t *off, uint8_t *buf, size_t bufsize)
cred = rump_pub_cred_suserget();
rv = RUMP_VOP_READDIR(vp, uio, cred, &eofflag, NULL, NULL);
rump_pub_cred_put(cred);
RUMP_VOP_UNLOCK(vp, 0);
RUMP_VOP_UNLOCK(vp);
*off = rump_pub_uio_getoff(uio);
resid = rump_pub_uio_free(uio);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttyserv.c,v 1.1 2010/03/07 23:28:14 pooka Exp $ */
/* $NetBSD: ttyserv.c,v 1.2 2010/06/24 13:03:05 hannken Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@ -102,14 +102,14 @@ handlereq(void *arg)
pr_open = (void *)pdr;
RUMP_VOP_LOCK(devvp, RUMP_LK_EXCLUSIVE);
rv = RUMP_VOP_OPEN(devvp, pr_open->pm_fmt, rootcred);
RUMP_VOP_UNLOCK(devvp, 0);
RUMP_VOP_UNLOCK(devvp);
break;
case PUD_CDEV_CLOSE:
pr_close = (void *)pdr;
RUMP_VOP_LOCK(devvp, RUMP_LK_EXCLUSIVE);
rv = RUMP_VOP_CLOSE(devvp, pr_close->pm_fmt, rootcred);
RUMP_VOP_UNLOCK(devvp, 0);
RUMP_VOP_UNLOCK(devvp);
break;
case PUD_CDEV_IOCTL:
@ -125,7 +125,7 @@ handlereq(void *arg)
pr_rw->pm_resid, pr_rw->pm_offset, RUMPUIO_READ);
RUMP_VOP_LOCK(devvp, RUMP_LK_SHARED);
rv = RUMP_VOP_READ(devvp, uio, 0, rootcred);
RUMP_VOP_UNLOCK(devvp, 0);
RUMP_VOP_UNLOCK(devvp);
reslen = rump_pub_uio_free(uio);
pdr->pdr_pth.pth_framelen -= reslen;
pr_rw->pm_resid = reslen;
@ -137,7 +137,7 @@ handlereq(void *arg)
pr_rw->pm_resid, pr_rw->pm_offset, RUMPUIO_WRITE);
RUMP_VOP_LOCK(devvp, RUMP_LK_EXCLUSIVE);
rv = RUMP_VOP_WRITE(devvp, uio, 0, rootcred);
RUMP_VOP_UNLOCK(devvp, 0);
RUMP_VOP_UNLOCK(devvp);
reslen = rump_pub_uio_free(uio);
pr_rw->pm_resid = reslen;
pdr->pdr_pth.pth_framelen=sizeof(struct pud_creq_write);

View File

@ -1,4 +1,4 @@
/* $NetBSD: umserv.c,v 1.1 2009/12/22 18:36:02 pooka Exp $ */
/* $NetBSD: umserv.c,v 1.2 2010/06/24 13:03:05 hannken Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@ -172,14 +172,14 @@ main(int argc, char *argv[])
pr_open = (void *)pdr;
RUMP_VOP_LOCK(devvp, RUMP_LK_EXCLUSIVE);
rv = RUMP_VOP_OPEN(devvp, pr_open->pm_fmt, rootcred);
RUMP_VOP_UNLOCK(devvp, 0);
RUMP_VOP_UNLOCK(devvp);
break;
case PUD_BDEV_CLOSE:
pr_close = (void *)pdr;
RUMP_VOP_LOCK(devvp, RUMP_LK_EXCLUSIVE);
rv = RUMP_VOP_CLOSE(devvp, pr_close->pm_fmt, rootcred);
RUMP_VOP_UNLOCK(devvp, 0);
RUMP_VOP_UNLOCK(devvp);
break;
case PUD_BDEV_IOCTL:
@ -195,7 +195,7 @@ main(int argc, char *argv[])
pr_rw->pm_resid, pr_rw->pm_offset, RUMPUIO_READ);
RUMP_VOP_LOCK(devvp, RUMP_LK_SHARED);
rv = RUMP_VOP_READ(devvp, uio, 0, rootcred);
RUMP_VOP_UNLOCK(devvp, 0);
RUMP_VOP_UNLOCK(devvp);
reslen = rump_pub_uio_free(uio);
pdr->pdr_pth.pth_framelen -= reslen;
pr_rw->pm_resid = reslen;
@ -207,7 +207,7 @@ main(int argc, char *argv[])
pr_rw->pm_resid, pr_rw->pm_offset, RUMPUIO_WRITE);
RUMP_VOP_LOCK(devvp, RUMP_LK_EXCLUSIVE);
rv = RUMP_VOP_WRITE(devvp, uio, 0, rootcred);
RUMP_VOP_UNLOCK(devvp, 0);
RUMP_VOP_UNLOCK(devvp);
reslen = rump_pub_uio_free(uio);
pr_rw->pm_resid = reslen;
pdr->pdr_pth.pth_framelen=sizeof(struct pud_creq_write);

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vnodeops.9,v 1.79 2010/06/24 07:54:46 hannken Exp $
.\" $NetBSD: vnodeops.9,v 1.80 2010/06/24 13:03:06 hannken Exp $
.\"
.\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -169,7 +169,7 @@
.Ft int
.Fn VOP_LOCK "struct vnode *vp" "int flags"
.Ft int
.Fn VOP_UNLOCK "struct vnode *vp" "int flags"
.Fn VOP_UNLOCK "struct vnode *vp"
.Ft int
.Fn VOP_ISLOCKED "struct vnode *vp"
.Ft int
@ -1083,16 +1083,11 @@ Kernel code should use
to lock a vnode rather than calling
.Fn VOP_LOCK
directly.
.It Fn VOP_UNLOCK "vp" "flags"
.It Fn VOP_UNLOCK "vp"
Wake up process sleeping on lock.
The argument
.Fa vp
is the vnode of the file to be unlocked.
The argument
.Fa flags
is a set of
.Xr lockmgr 9
flags.
If the operation is successful zero is returned, otherwise an
appropriate error code is returned.
.Fn VOP_UNLOCK

View File

@ -1,4 +1,4 @@
/* $NetBSD: xbdback_xenbus.c,v 1.31 2010/01/24 04:06:31 haad Exp $ */
/* $NetBSD: xbdback_xenbus.c,v 1.32 2010/06/24 13:03:06 hannken Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.31 2010/01/24 04:06:31 haad Exp $");
__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.32 2010/06/24 13:03:06 hannken Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -720,7 +720,7 @@ xbdback_backend_changed(struct xenbus_watch *watch,
vput(xbdi->xbdi_vp);
return;
}
VOP_UNLOCK(xbdi->xbdi_vp, 0);
VOP_UNLOCK(xbdi->xbdi_vp);
/* dk device; get wedge data */
struct dkwedge_info wi;

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_vnops.c,v 1.73 2010/06/24 10:37:22 hannken Exp $ */
/* $NetBSD: coda_vnops.c,v 1.74 2010/06/24 13:03:06 hannken Exp $ */
/*
*
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.73 2010/06/24 10:37:22 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.74 2010/06/24 13:03:06 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -290,7 +290,7 @@ coda_open(void *v)
* Drop the lock on the container, after we have done VOP_OPEN
* (which requires a locked vnode).
*/
VOP_UNLOCK(container_vp, 0);
VOP_UNLOCK(container_vp);
return(error);
}
@ -436,7 +436,7 @@ coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw, int ioflag,
* Drop lock.
* XXX Where is reference released.
*/
VOP_UNLOCK(cfvp, 0);
VOP_UNLOCK(cfvp);
}
else {
printf("coda_rdwr: internal VOP_OPEN\n");
@ -859,7 +859,7 @@ coda_inactive(void *v)
vp, vp->v_usecount);
if (cp->c_ovp != NULL)
printf("coda_inactive: %p ovp != NULL\n", vp);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
} else {
/* Sanity checks that perhaps should be panic. */
if (vp->v_usecount) {
@ -868,7 +868,7 @@ coda_inactive(void *v)
if (cp->c_ovp != NULL) {
printf("coda_inactive: %p ovp != NULL\n", vp);
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
*ap->a_recycle = true;
}
@ -1028,7 +1028,7 @@ coda_lookup(void *v)
if (*ap->a_vpp && (*ap->a_vpp != dvp)) {
if (flags & ISDOTDOT)
/* ..: unlock parent */
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
/* all but .: lock child */
vn_lock(*ap->a_vpp, LK_EXCLUSIVE | LK_RETRY);
if (flags & ISDOTDOT)
@ -1273,7 +1273,7 @@ coda_link(void *v)
goto exit;
}
error = venus_link(vtomi(vp), &cp->c_fid, &dcp->c_fid, nm, len, cred, l);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
/* Invalidate parent's attr cache (the modification time has changed). */
VTOC(dvp)->c_flags &= ~C_VATTR;
@ -1805,7 +1805,7 @@ coda_unlock(void *v)
coda_f2s(&cp->c_fid)));
}
return (vlockmgr(&vp->v_lock, ap->a_flags | LK_RELEASE));
return (vlockmgr(&vp->v_lock, LK_RELEASE));
}
int
@ -2050,7 +2050,7 @@ coda_getpages(void *v)
printf("coda_getpages: cannot open vnode %p => %d\n",
vp, cerror);
if (waslocked == 0)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return cerror;
}
@ -2082,7 +2082,7 @@ coda_getpages(void *v)
/* If we obtained a lock, drop it. */
if (waslocked == 0)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
}
return error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_syscalls_20.c,v 1.34 2009/06/29 05:08:15 dholland Exp $ */
/* $NetBSD: vfs_syscalls_20.c,v 1.35 2010/06/24 13:03:06 hannken Exp $ */
/*
* Copyright (c) 1989, 1993
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.34 2009/06/29 05:08:15 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.35 2010/06/24 13:03:06 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -285,7 +285,7 @@ compat_20_sys_fhstatfs(struct lwp *l, const struct compat_20_sys_fhstatfs_args *
if ((error = VFS_FHTOVP(mp, (struct fid*)&fh.fh_fid, &vp)))
return (error);
mp = vp->v_mount;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
sbuf = malloc(sizeof(*sbuf), M_TEMP, M_WAITOK);
if ((error = VFS_STATVFS(mp, sbuf)) != 0)
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_syscalls_30.c,v 1.31 2010/03/03 08:20:38 he Exp $ */
/* $NetBSD: vfs_syscalls_30.c,v 1.32 2010/06/24 13:03:06 hannken Exp $ */
/*-
* Copyright (c) 2005, 2008 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_30.c,v 1.31 2010/03/03 08:20:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_30.c,v 1.32 2010/06/24 13:03:06 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -316,7 +316,7 @@ again:
eof:
*retval = SCARG(uap, count) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(tbuf, M_TEMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_syscalls_43.c,v 1.52 2010/03/02 14:23:39 pooka Exp $ */
/* $NetBSD: vfs_syscalls_43.c,v 1.53 2010/06/24 13:03:06 hannken Exp $ */
/*
* Copyright (c) 1989, 1993
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.52 2010/03/02 14:23:39 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_43.c,v 1.53 2010/06/24 13:03:06 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -423,7 +423,7 @@ unionread:
}
free(dirbuf, M_TEMP);
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (error)
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: darwin_mman.c,v 1.31 2009/03/18 16:00:16 cegger Exp $ */
/* $NetBSD: darwin_mman.c,v 1.32 2010/06/24 13:03:06 hannken Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: darwin_mman.c,v 1.31 2009/03/18 16:00:16 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: darwin_mman.c,v 1.32 2010/06/24 13:03:06 hannken Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -208,11 +208,11 @@ darwin_sys_load_shared_file(struct lwp *l, const struct darwin_sys_load_shared_f
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if ((error = (*evc.ev_proc)(l, &evc)) != 0) {
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
DPRINTF(("Failed\n"));
goto bad2;
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
DPRINTF(("Success\n"));
}
bad2:

View File

@ -1,4 +1,4 @@
/* $NetBSD: ibcs2_misc.c,v 1.110 2010/03/03 08:20:39 he Exp $ */
/* $NetBSD: ibcs2_misc.c,v 1.111 2010/06/24 13:03:06 hannken Exp $ */
/*
* Copyright (c) 1992, 1993
@ -95,7 +95,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.110 2010/03/03 08:20:39 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.111 2010/06/24 13:03:06 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -483,7 +483,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(tbuf, M_TEMP);
@ -616,7 +616,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(tbuf, M_TEMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: irix_dirent.c,v 1.24 2010/03/03 08:20:38 he Exp $ */
/* $NetBSD: irix_dirent.c,v 1.25 2010/06/24 13:03:06 hannken Exp $ */
/*-
* Copyright (c) 1994, 2001, 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: irix_dirent.c,v 1.24 2010/03/03 08:20:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: irix_dirent.c,v 1.25 2010/06/24 13:03:06 hannken Exp $");
#include <sys/types.h>
#include <sys/signal.h>
@ -184,7 +184,7 @@ again:
eof:
*retval = SCARG(uap, nbyte) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(buf, M_TEMP);
@ -339,7 +339,7 @@ again:
eof:
*retval = SCARG(uap, nbyte) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(buf, M_TEMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: irix_mman.c,v 1.23 2010/01/08 11:35:07 pooka Exp $ */
/* $NetBSD: irix_mman.c,v 1.24 2010/06/24 13:03:06 hannken Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: irix_mman.c,v 1.23 2010/01/08 11:35:07 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: irix_mman.c,v 1.24 2010/06/24 13:03:06 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@ -187,7 +187,7 @@ irix_mmap(struct lwp *l, void *addr, size_t len, int prot, int flags, int fd, of
error = VOP_SETATTR(vp, &vattr, l->l_cred);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
}
out:
fd_putfile(fd);

View File

@ -1,4 +1,4 @@
/* $NetBSD: irix_usema.c,v 1.33 2008/05/10 12:57:18 tnn Exp $ */
/* $NetBSD: irix_usema.c,v 1.34 2010/06/24 13:03:06 hannken Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: irix_usema.c,v 1.33 2008/05/10 12:57:18 tnn Exp $");
__KERNEL_RCSID(0, "$NetBSD: irix_usema.c,v 1.34 2010/06/24 13:03:06 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -353,7 +353,7 @@ irix_usema_inactive(void *v)
struct vnode *a_vp;
} */ *ap = v;
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
vrecycle(ap->a_vp, NULL, curlwp);
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_file64.c,v 1.50 2010/03/03 08:20:38 he Exp $ */
/* $NetBSD: linux_file64.c,v 1.51 2010/06/24 13:03:07 hannken Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.50 2010/03/03 08:20:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.51 2010/06/24 13:03:07 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -347,7 +347,7 @@ again:
eof:
*retval = nbytes - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(tbuf, M_TEMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_misc.c,v 1.214 2010/03/03 08:20:38 he Exp $ */
/* $NetBSD: linux_misc.c,v 1.215 2010/06/24 13:03:07 hannken Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.214 2010/03/03 08:20:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.215 2010/06/24 13:03:07 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -817,7 +817,7 @@ again:
eof:
*retval = nbytes - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(tbuf, M_TEMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux32_dirent.c,v 1.10 2010/03/03 08:20:38 he Exp $ */
/* $NetBSD: linux32_dirent.c,v 1.11 2010/06/24 13:03:07 hannken Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.10 2010/03/03 08:20:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.11 2010/06/24 13:03:07 hannken Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -243,7 +243,7 @@ again:
eof:
*retval = nbytes - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(tbuf, M_TEMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mach_vm.c,v 1.61 2009/03/18 16:00:17 cegger Exp $ */
/* $NetBSD: mach_vm.c,v 1.62 2010/06/24 13:03:07 hannken Exp $ */
/*-
* Copyright (c) 2002-2003, 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mach_vm.c,v 1.61 2009/03/18 16:00:17 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: mach_vm.c,v 1.62 2010/06/24 13:03:07 hannken Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -384,7 +384,7 @@ mach_sys_map_fd(struct lwp *l, const struct mach_sys_map_fd_args *uap, register_
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if ((error = (*evc.ev_proc)(l, &evc)) != 0) {
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
#ifdef DEBUG_MACH_VM
printf("mach_sys_map_fd: mapping at %p failed\n", va);
@ -435,7 +435,7 @@ mach_sys_map_fd(struct lwp *l, const struct mach_sys_map_fd_args *uap, register_
return 0;
bad1:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
bad2:
vrele(vp);
fd_putfile(SCARG(uap, fd));

View File

@ -1,4 +1,4 @@
/* $NetBSD: osf1_exec_ecoff.c,v 1.22 2010/05/02 05:30:20 dholland Exp $ */
/* $NetBSD: osf1_exec_ecoff.c,v 1.23 2010/06/24 13:03:07 hannken Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: osf1_exec_ecoff.c,v 1.22 2010/05/02 05:30:20 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: osf1_exec_ecoff.c,v 1.23 2010/06/24 13:03:07 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -233,7 +233,7 @@ osf1_exec_ecoff_dynamic(struct lwp *l, struct exec_package *epp)
if (ldr_vp->v_mount->mnt_flag & MNT_NOSUID)
epp->ep_vap->va_mode &= ~(S_ISUID | S_ISGID);
VOP_UNLOCK(ldr_vp, 0);
VOP_UNLOCK(ldr_vp);
/*
* read the header, and make sure we got all of it.
@ -289,7 +289,7 @@ osf1_exec_ecoff_dynamic(struct lwp *l, struct exec_package *epp)
return (0);
badunlock:
VOP_UNLOCK(ldr_vp, 0);
VOP_UNLOCK(ldr_vp);
bad:
vrele(ldr_vp);
return (error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: osf1_file.c,v 1.39 2010/04/23 15:19:20 rmind Exp $ */
/* $NetBSD: osf1_file.c,v 1.40 2010/06/24 13:03:07 hannken Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.39 2010/04/23 15:19:20 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.40 2010/06/24 13:03:07 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_syscall_debug.h"
@ -243,7 +243,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
kmem_free(buf, buflen);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pecoff_exec.c,v 1.38 2007/12/08 18:36:22 dsl Exp $ */
/* $NetBSD: pecoff_exec.c,v 1.39 2010/06/24 13:03:07 hannken Exp $ */
/*
* Copyright (c) 2000 Masaru OKI
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pecoff_exec.c,v 1.38 2007/12/08 18:36:22 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: pecoff_exec.c,v 1.39 2010/06/24 13:03:07 hannken Exp $");
/*#define DEBUG_PECOFF*/
@ -182,7 +182,7 @@ pecoff_load_file(struct lwp *l, struct exec_package *epp, const char *path, stru
if ((error = vn_marktext(vp)))
goto badunlock;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
/*
* Read header.
*/
@ -240,7 +240,7 @@ pecoff_load_file(struct lwp *l, struct exec_package *epp, const char *path, stru
return 0;
badunlock:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
bad:
if (fp != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunos_misc.c,v 1.167 2010/03/03 11:07:17 pooka Exp $ */
/* $NetBSD: sunos_misc.c,v 1.168 2010/06/24 13:03:07 hannken Exp $ */
/*
* Copyright (c) 1992, 1993
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sunos_misc.c,v 1.167 2010/03/03 11:07:17 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: sunos_misc.c,v 1.168 2010/06/24 13:03:07 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -470,7 +470,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
free(cookiebuf, M_TEMP);
free(buf, M_TEMP);
out1:

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunos32_misc.c,v 1.71 2010/03/03 11:02:34 pooka Exp $ */
/* $NetBSD: sunos32_misc.c,v 1.72 2010/06/24 13:03:07 hannken Exp $ */
/* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp */
/*
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.71 2010/03/03 11:02:34 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.72 2010/06/24 13:03:07 hannken Exp $");
#define COMPAT_SUNOS 1
@ -707,7 +707,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
free(cookiebuf, M_TEMP);
free(sbuf, M_TEMP);
out1:

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_misc.c,v 1.149 2010/03/03 08:20:38 he Exp $ */
/* $NetBSD: svr4_misc.c,v 1.150 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.149 2010/03/03 08:20:38 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.150 2010/06/24 13:03:08 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -315,7 +315,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(tbuf, M_TEMP);
@ -440,7 +440,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(tbuf, M_TEMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_32_misc.c,v 1.68 2010/03/03 08:20:39 he Exp $ */
/* $NetBSD: svr4_32_misc.c,v 1.69 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.68 2010/03/03 08:20:39 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.69 2010/06/24 13:03:08 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -315,7 +315,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(sbuf, M_TEMP);
@ -440,7 +440,7 @@ again:
eof:
*retval = SCARG(uap, nbytes) - resid;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (cookiebuf)
free(cookiebuf, M_TEMP);
free(sbuf, M_TEMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ata_raid_subr.c,v 1.1 2008/09/16 11:45:30 tron Exp $ */
/* $NetBSD: ata_raid_subr.c,v 1.2 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 2008 Juan Romero Pardines.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ata_raid_subr.c,v 1.1 2008/09/16 11:45:30 tron Exp $");
__KERNEL_RCSID(0, "$NetBSD: ata_raid_subr.c,v 1.2 2010/06/24 13:03:08 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -90,7 +90,7 @@ ata_raid_disk_vnode_find(struct ataraid_disk_info *adi)
return NULL;
}
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
adv->adv_adi = adi;
adv->adv_vnode = vp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cons.c,v 1.66 2009/11/23 02:13:45 rmind Exp $ */
/* $NetBSD: cons.c,v 1.67 2010/06/24 13:03:08 hannken Exp $ */
/*
* Copyright (c) 1990, 1993
@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.66 2009/11/23 02:13:45 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.67 2010/06/24 13:03:08 hannken Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -157,7 +157,7 @@ cnopen(dev_t dev, int flag, int mode, struct lwp *l)
error = vn_lock(cn_devvp[unit], LK_EXCLUSIVE | LK_RETRY);
if (error == 0) {
error = VOP_OPEN(cn_devvp[unit], flag, kauth_cred_get());
VOP_UNLOCK(cn_devvp[unit], 0);
VOP_UNLOCK(cn_devvp[unit]);
}
return error;
}
@ -178,7 +178,7 @@ cnclose(dev_t dev, int flag, int mode, struct lwp *l)
error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error == 0) {
error = VOP_CLOSE(vp, flag, kauth_cred_get());
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
}
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dksubr.c,v 1.40 2009/01/13 13:35:52 yamt Exp $ */
/* $NetBSD: dksubr.c,v 1.41 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.40 2009/01/13 13:35:52 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.41 2010/06/24 13:03:08 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -652,11 +652,11 @@ dk_lookup(const char *path, struct lwp *l, struct vnode **vpp,
IFDEBUG(DKDB_VNODE, vprint("dk_lookup: vnode info", vp));
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
*vpp = vp;
return 0;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
(void) vn_close(vp, FREAD | FWRITE, l->l_cred);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dk.c,v 1.55 2010/02/07 16:04:31 mlelstv Exp $ */
/* $NetBSD: dk.c,v 1.56 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.55 2010/02/07 16:04:31 mlelstv Exp $");
__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.56 2010/06/24 13:03:08 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_dkwedge.h"
@ -903,7 +903,7 @@ dkwedge_discover(struct disk *pdk)
vput(vp);
goto out;
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
/*
* For each supported partition map type, look to see if
@ -1022,7 +1022,7 @@ dkopen(dev_t dev, int flags, int fmt, struct lwp *l)
mutex_enter(&vp->v_interlock);
vp->v_writecount++;
mutex_exit(&vp->v_interlock);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
sc->sc_parent->dk_rawvp = vp;
}
sc->sc_parent->dk_rawopens++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: firmload.c,v 1.11 2008/04/28 20:23:46 martin Exp $ */
/* $NetBSD: firmload.c,v 1.12 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: firmload.c,v 1.11 2008/04/28 20:23:46 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: firmload.c,v 1.12 2010/06/24 13:03:08 hannken Exp $");
/*
* The firmload API provides an interface for device drivers to access
@ -261,14 +261,14 @@ firmware_open(const char *drvname, const char *imgname, firmware_handle_t *fhp)
error = VOP_GETATTR(vp, &va, kauth_cred_get());
if (error) {
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
(void)vn_close(vp, FREAD, kauth_cred_get());
firmware_handle_free(fh);
return (error);
}
if (va.va_type != VREG) {
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
(void)vn_close(vp, FREAD, kauth_cred_get());
firmware_handle_free(fh);
return (EINVAL);
@ -279,7 +279,7 @@ firmware_open(const char *drvname, const char *imgname, firmware_handle_t *fhp)
fh->fh_vp = vp;
fh->fh_size = va.va_size;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
*fhp = fh;
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fss.c,v 1.69 2010/04/16 11:22:43 pooka Exp $ */
/* $NetBSD: fss.c,v 1.70 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.69 2010/04/16 11:22:43 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.70 2010/06/24 13:03:08 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -629,7 +629,7 @@ fss_create_files(struct fss_softc *sc, struct fss_set *fss,
if (FSS_FSBSIZE(sc) == fsbsize)
break;
if (sc->sc_bs_bshift >= bits) {
VOP_UNLOCK(sc->sc_bs_vp, 0);
VOP_UNLOCK(sc->sc_bs_vp);
return EINVAL;
}
@ -639,7 +639,7 @@ fss_create_files(struct fss_softc *sc, struct fss_set *fss,
error = VFS_SNAPSHOT(sc->sc_mount, sc->sc_bs_vp, &ts);
TIMESPEC_TO_TIMEVAL(&sc->sc_time, &ts);
VOP_UNLOCK(sc->sc_bs_vp, 0);
VOP_UNLOCK(sc->sc_bs_vp);
return error;
}
@ -679,7 +679,7 @@ fss_create_files(struct fss_softc *sc, struct fss_set *fss,
NDINIT(&nd2, LOOKUP, FOLLOW, UIO_USERSPACE, fss->fss_bstore);
if ((error = vn_open(&nd2, FREAD|FWRITE, 0)) != 0)
return error;
VOP_UNLOCK(nd2.ni_vp, 0);
VOP_UNLOCK(nd2.ni_vp);
sc->sc_bs_vp = nd2.ni_vp;
@ -966,7 +966,7 @@ fss_bs_io(struct fss_softc *sc, fss_io_type rw,
round_page(off+len), PGO_CLEANIT|PGO_SYNCIO|PGO_FREE);
}
VOP_UNLOCK(sc->sc_bs_vp, 0);
VOP_UNLOCK(sc->sc_bs_vp);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kloader.c,v 1.21 2010/02/07 03:24:15 uebayasi Exp $ */
/* $NetBSD: kloader.c,v 1.22 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.21 2010/02/07 03:24:15 uebayasi Exp $");
__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.22 2010/06/24 13:03:08 hannken Exp $");
#include "debug_kloader.h"
@ -611,7 +611,7 @@ kloader_close(void)
struct lwp *l = KLOADER_LWP;
struct vnode *vp = kloader.vp;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
vn_close(vp, FREAD, l->l_cred);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnd.c,v 1.208 2010/03/02 21:32:29 pooka Exp $ */
/* $NetBSD: vnd.c,v 1.209 2010/06/24 13:03:08 hannken Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@ -130,7 +130,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.208 2010/03/02 21:32:29 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.209 2010/06/24 13:03:08 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@ -571,7 +571,7 @@ vnode_strategy_probe(struct vnd_softc *vnd)
error = 0;
vn_lock(vnd->sc_vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_BMAP(vnd->sc_vp, 0, NULL, &nbn, NULL);
VOP_UNLOCK(vnd->sc_vp, 0);
VOP_UNLOCK(vnd->sc_vp);
/* Test if that worked. */
if (error == 0 && (long)nbn == -1)
@ -815,7 +815,7 @@ handle_with_strategy(struct vnd_softc *vnd, const struct buf *obp,
nra = 0;
vn_lock(vnd->sc_vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_BMAP(vnd->sc_vp, bn / bsize, &vp, &nbn, &nra);
VOP_UNLOCK(vnd->sc_vp, 0);
VOP_UNLOCK(vnd->sc_vp);
if (error == 0 && (long)nbn == -1)
error = EIO;
@ -1103,7 +1103,7 @@ vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
/* File is definitely sparse, reject here */
error = EINVAL;
if (error) {
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
goto close_and_exit;
}
@ -1126,7 +1126,7 @@ vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
IO_UNIT|IO_NODELOCKED, l->l_cred, NULL, NULL);
if (error) {
free(ch, M_TEMP);
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
goto close_and_exit;
}
@ -1137,14 +1137,14 @@ vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
free(ch, M_TEMP);
if (vnd->sc_comp_blksz == 0 ||
vnd->sc_comp_blksz % DEV_BSIZE !=0) {
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
error = EINVAL;
goto close_and_exit;
}
if (sizeof(struct vnd_comp_header) +
sizeof(u_int64_t) * vnd->sc_comp_numoffs >
vattr.va_size) {
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
error = EINVAL;
goto close_and_exit;
}
@ -1166,7 +1166,7 @@ vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
sizeof(struct vnd_comp_header), UIO_SYSSPACE,
IO_UNIT|IO_NODELOCKED, l->l_cred, NULL, NULL);
if (error) {
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
goto close_and_exit;
}
/*
@ -1203,20 +1203,20 @@ vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
if (vnd->sc_comp_stream.msg)
printf("vnd%d: compressed file, %s\n",
unit, vnd->sc_comp_stream.msg);
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
error = EINVAL;
goto close_and_exit;
}
vnd->sc_flags |= VNF_COMP | VNF_READONLY;
#else /* !VND_COMPRESSION */
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
error = EOPNOTSUPP;
goto close_and_exit;
#endif /* VND_COMPRESSION */
}
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
vnd->sc_vp = nd.ni_vp;
vnd->sc_size = btodb(vattr.va_size); /* note truncation */
@ -1498,7 +1498,7 @@ unlock_and_exit:
vn_lock(vnd->sc_vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(vnd->sc_vp, vnd->sc_cred,
FSYNC_WAIT | FSYNC_DATAONLY | FSYNC_CACHE, 0, 0);
VOP_UNLOCK(vnd->sc_vp, 0);
VOP_UNLOCK(vnd->sc_vp);
return error;
default:
@ -1547,7 +1547,7 @@ vndsetcred(struct vnd_softc *vnd, kauth_cred_t cred)
error = vinvalbuf(vnd->sc_vp, V_SAVE, vnd->sc_cred,
curlwp, 0, 0);
}
VOP_UNLOCK(vnd->sc_vp, 0);
VOP_UNLOCK(vnd->sc_vp);
free(tmpbuf, M_TEMP);
return error;
@ -1861,7 +1861,7 @@ compstrategy(struct buf *bp, off_t bn)
NULL, NULL);
if (error) {
bp->b_error = error;
VOP_UNLOCK(vnd->sc_vp, 0);
VOP_UNLOCK(vnd->sc_vp);
splx(s);
return;
}
@ -1878,12 +1878,12 @@ compstrategy(struct buf *bp, off_t bn)
"compressed file, %s\n",
vnd->sc_comp_stream.msg);
bp->b_error = EBADMSG;
VOP_UNLOCK(vnd->sc_vp, 0);
VOP_UNLOCK(vnd->sc_vp);
splx(s);
return;
}
vnd->sc_comp_buffblk = comp_block;
VOP_UNLOCK(vnd->sc_vp, 0);
VOP_UNLOCK(vnd->sc_vp);
}
/* transfer the usable uncompressed data */

View File

@ -1,4 +1,4 @@
/* $NetBSD: adlookup.c,v 1.13 2010/01/08 11:35:08 pooka Exp $ */
/* $NetBSD: adlookup.c,v 1.14 2010/06/24 13:03:08 hannken Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: adlookup.c,v 1.13 2010/01/08 11:35:08 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: adlookup.c,v 1.14 2010/06/24 13:03:08 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -142,7 +142,7 @@ adosfs_lookup(void *v)
* and fail. Otherwise we have succeded.
*
*/
VOP_UNLOCK(vdp, 0); /* race */
VOP_UNLOCK(vdp); /* race */
error = VFS_VGET(vdp->v_mount, (ino_t)adp->pblock, vpp);
vn_lock(vdp, LK_EXCLUSIVE | LK_RETRY);
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: advfsops.c,v 1.59 2009/08/30 12:36:38 phx Exp $ */
/* $NetBSD: advfsops.c,v 1.60 2010/06/24 13:03:08 hannken Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.59 2009/08/30 12:36:38 phx Exp $");
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.60 2010/06/24 13:03:08 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -141,7 +141,7 @@ adosfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = genfs_can_mount(devvp, accessmode, l->l_cred);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
if (error) {
vrele(devvp);
return (error);
@ -264,7 +264,7 @@ adosfs_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l)
fail:
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void) VOP_CLOSE(devvp, FREAD, NOCRED);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
if (amp && amp->bitmap)
free(amp->bitmap, M_ADOSFSBITMAP);
if (amp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: advnops.c,v 1.36 2009/08/30 12:36:38 phx Exp $ */
/* $NetBSD: advnops.c,v 1.37 2010/06/24 13:03:09 hannken Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.36 2009/08/30 12:36:38 phx Exp $");
__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.37 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -852,7 +852,7 @@ adosfs_inactive(void *v)
#ifdef ADOSFS_DIAGNOSTIC
advopprint(sp);
#endif
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
/* XXX this needs to check if file was deleted */
*sp->a_recycle = true;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_lookup.c,v 1.17 2010/01/08 11:35:08 pooka Exp $ */
/* $NetBSD: cd9660_lookup.c,v 1.18 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 1989, 1993, 1994
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd9660_lookup.c,v 1.17 2010/01/08 11:35:08 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd9660_lookup.c,v 1.18 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/namei.h>
@ -381,7 +381,7 @@ found:
*/
brelse(bp, 0);
if (flags & ISDOTDOT) {
VOP_UNLOCK(pdp, 0); /* race to get the inode */
VOP_UNLOCK(pdp); /* race to get the inode */
error = cd9660_vget_internal(vdp->v_mount, dp->i_ino, &tdp,
dp->i_ino != ino, ep);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_node.c,v 1.24 2008/05/05 17:11:16 ad Exp $ */
/* $NetBSD: cd9660_node.c,v 1.25 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1994
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd9660_node.c,v 1.24 2008/05/05 17:11:16 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd9660_node.c,v 1.25 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -213,7 +213,7 @@ cd9660_inactive(void *v)
*/
ip->i_flag = 0;
*ap->a_recycle = (ip->inode.iso_mode == 0);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_vfsops.c,v 1.70 2010/01/26 21:29:48 mlelstv Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.71 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 1994
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.70 2010/01/26 21:29:48 mlelstv Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.71 2010/06/24 13:03:09 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -265,7 +265,7 @@ cd9660_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
*/
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = genfs_can_mount(devvp, VREAD, l->l_cred);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
if (error) {
vrele(devvp);
return (error);
@ -278,7 +278,7 @@ cd9660_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
if (error) {
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(devvp, FREAD, NOCRED);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
goto fail;
}
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: efs_vfsops.c,v 1.19 2009/04/25 18:53:44 elad Exp $ */
/* $NetBSD: efs_vfsops.c,v 1.20 2010/06/24 13:03:09 hannken Exp $ */
/*
* Copyright (c) 2006 Stephen M. Rumble <rumble@ephemeral.org>
@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: efs_vfsops.c,v 1.19 2009/04/25 18:53:44 elad Exp $");
__KERNEL_RCSID(0, "$NetBSD: efs_vfsops.c,v 1.20 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -232,7 +232,7 @@ efs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
return (err);
}
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: efs_vnops.c,v 1.21 2010/03/29 13:11:32 pooka Exp $ */
/* $NetBSD: efs_vnops.c,v 1.22 2010/06/24 13:03:09 hannken Exp $ */
/*
* Copyright (c) 2006 Stephen M. Rumble <rumble@ephemeral.org>
@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: efs_vnops.c,v 1.21 2010/03/29 13:11:32 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: efs_vnops.c,v 1.22 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -89,7 +89,7 @@ efs_lookup(void *v)
if (err)
return (err);
VOP_UNLOCK(ap->a_dvp, 0); /* preserve lock order */
VOP_UNLOCK(ap->a_dvp); /* preserve lock order */
err = VFS_VGET(ap->a_dvp->v_mount, ino, &vp);
if (err) {
@ -583,7 +583,7 @@ efs_inactive(void *v)
struct efs_inode *eip = EFS_VTOI(ap->a_vp);
*ap->a_recycle = (eip->ei_mode == 0);
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: filecore_lookup.c,v 1.12 2010/01/08 11:35:08 pooka Exp $ */
/* $NetBSD: filecore_lookup.c,v 1.13 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 1989, 1993, 1994 The Regents of the University of California.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: filecore_lookup.c,v 1.12 2010/01/08 11:35:08 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: filecore_lookup.c,v 1.13 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/namei.h>
@ -292,7 +292,7 @@ found:
if (flags & ISDOTDOT) {
ino_t pin = filecore_getparent(dp);
VOP_UNLOCK(pdp, 0); /* race to get the inode */
VOP_UNLOCK(pdp); /* race to get the inode */
error = VFS_VGET(vdp->v_mount, pin, &tdp);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: filecore_node.c,v 1.19 2009/03/15 22:16:50 cegger Exp $ */
/* $NetBSD: filecore_node.c,v 1.20 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1994
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: filecore_node.c,v 1.19 2009/03/15 22:16:50 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: filecore_node.c,v 1.20 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -233,7 +233,7 @@ filecore_inactive(void *v)
*/
ip->i_flag = 0;
*ap->a_recycle = (filecore_staleinode(ip) != 0);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: filecore_vfsops.c,v 1.63 2010/04/11 10:26:26 mlelstv Exp $ */
/* $NetBSD: filecore_vfsops.c,v 1.64 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 1994 The Regents of the University of California.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.63 2010/04/11 10:26:26 mlelstv Exp $");
__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.64 2010/06/24 13:03:09 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -289,7 +289,7 @@ filecore_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
*/
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = genfs_can_mount(devvp, VREAD, l->l_cred);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
if (error) {
vrele(devvp);
return (error);
@ -428,7 +428,7 @@ out:
}
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: hfs_subr.c,v 1.13 2009/11/27 16:23:23 pooka Exp $ */
/* $NetBSD: hfs_subr.c,v 1.14 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hfs_subr.c,v 1.13 2009/11/27 16:23:23 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: hfs_subr.c,v 1.14 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -184,7 +184,7 @@ hfs_libcb_opendev(
/* Flush out any old buffers remaining from a previous use. */
vn_lock(args->devvp, LK_EXCLUSIVE | LK_RETRY);
result = vinvalbuf(args->devvp, V_SAVE, args->cred, args->l, 0, 0);
VOP_UNLOCK(args->devvp, 0);
VOP_UNLOCK(args->devvp);
if (result != 0) {
VOP_CLOSE(args->devvp, mode, FSCRED);
goto error;
@ -207,7 +207,7 @@ error:
vn_lock(cbdata->devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(cbdata->devvp, vol->readonly ? FREAD :
FREAD | FWRITE, NOCRED);
VOP_UNLOCK(cbdata->devvp, 0);
VOP_UNLOCK(cbdata->devvp);
}
free(cbdata, M_HFSMNT);
vol->cbdata = NULL;
@ -230,7 +230,7 @@ hfs_libcb_closedev(hfs_volume* in_vol, hfs_callback_args* cbargs)
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(devvp,
in_vol->readonly ? FREAD : FREAD | FWRITE, NOCRED);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
}
free(in_vol->cbdata, M_HFSMNT);

View File

@ -1,4 +1,4 @@
/* $NetBSD: hfs_vfsops.c,v 1.25 2010/01/08 11:35:08 pooka Exp $ */
/* $NetBSD: hfs_vfsops.c,v 1.26 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.25 2010/01/08 11:35:08 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.26 2010/06/24 13:03:09 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -287,7 +287,7 @@ hfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = genfs_can_mount(devvp, accessmode, l->l_cred);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
}
if (error != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: hfs_vnops.c,v 1.17 2010/03/29 13:11:33 pooka Exp $ */
/* $NetBSD: hfs_vnops.c,v 1.18 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hfs_vnops.c,v 1.17 2010/03/29 13:11:33 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: hfs_vnops.c,v 1.18 2010/06/24 13:03:09 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@ -385,7 +385,7 @@ hfs_vop_lookup(void *v)
pdp = vdp;
if (flags & ISDOTDOT) {
/*printf("DOTDOT ");*/
VOP_UNLOCK(pdp, 0); /* race to get the inode */
VOP_UNLOCK(pdp); /* race to get the inode */
error = VFS_VGET(vdp->v_mount, dp->h_parent, &tdp);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
if (error != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_denode.c,v 1.38 2010/04/09 08:09:18 hannken Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.39 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.38 2010/04/09 08:09:18 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.39 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -698,7 +698,7 @@ out:
vp->v_usecount, dep->de_Name[0]);
#endif
*ap->a_recycle = (dep->de_Name[0] == SLOT_DELETED);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
fstrans_done(mp);
return (error);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_lookup.c,v 1.20 2010/01/08 11:35:08 pooka Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.21 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: msdosfs_lookup.c,v 1.20 2010/01/08 11:35:08 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: msdosfs_lookup.c,v 1.21 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -538,7 +538,7 @@ foundroot:
*/
pdp = vdp;
if (flags & ISDOTDOT) {
VOP_UNLOCK(pdp, 0); /* race to get the inode */
VOP_UNLOCK(pdp); /* race to get the inode */
error = deget(pmp, cluster, blkoff, &tdp);
vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_vfsops.c,v 1.85 2010/04/13 10:12:43 pooka Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.86 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.85 2010/04/13 10:12:43 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.86 2010/06/24 13:03:09 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -363,7 +363,7 @@ msdosfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = genfs_can_mount(devvp, VREAD | VWRITE,
l->l_cred);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
DPRINTF(("genfs_can_mount %d\n", error));
if (error)
return (error);
@ -405,7 +405,7 @@ msdosfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = genfs_can_mount(devvp, accessmode, l->l_cred);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
if (error) {
DPRINTF(("genfs_can_mount %d\n", error));
vrele(devvp);
@ -428,7 +428,7 @@ msdosfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
DPRINTF(("msdosfs_mountfs %d\n", error));
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void) VOP_CLOSE(devvp, xflags, NOCRED);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
goto fail;
}
#ifdef MSDOSFS_DEBUG /* only needed for the printf below */

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_vnops.c,v 1.66 2010/05/25 10:15:34 pooka Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.67 2010/06/24 13:03:09 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.66 2010/05/25 10:15:34 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.67 2010/06/24 13:03:09 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -899,7 +899,7 @@ abortit:
(fcnp->cn_flags & ISDOTDOT) ||
(tcnp->cn_flags & ISDOTDOT) ||
(ip->de_flag & DE_RENAME)) {
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
error = EINVAL;
goto abortit;
}
@ -932,7 +932,7 @@ abortit:
* call to doscheckpath().
*/
error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred);
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
if (VTODE(fdvp)->de_StartCluster != VTODE(tdvp)->de_StartCluster)
newparent = 1;
@ -962,7 +962,7 @@ abortit:
panic("msdosfs_rename: lost to startdir");
vn_lock(tdvp, LK_EXCLUSIVE | LK_RETRY);
if ((error = relookup(tdvp, &tvp, tcnp)) != 0) {
VOP_UNLOCK(tdvp, 0);
VOP_UNLOCK(tdvp);
goto out;
}
/*
@ -1020,10 +1020,10 @@ abortit:
fcnp->cn_flags |= LOCKPARENT | LOCKLEAF;
if ((fcnp->cn_flags & SAVESTART) == 0)
panic("msdosfs_rename: lost from startdir");
VOP_UNLOCK(tdvp, 0);
VOP_UNLOCK(tdvp);
vn_lock(fdvp, LK_EXCLUSIVE | LK_RETRY);
if ((error = relookup(fdvp, &fvp, fcnp))) {
VOP_UNLOCK(fdvp, 0);
VOP_UNLOCK(fdvp);
vrele(ap->a_fvp);
vrele(tdvp);
fstrans_done(fdvp->v_mount);
@ -1042,7 +1042,7 @@ abortit:
return 0;
}
fdvp_dorele = 1;
VOP_UNLOCK(fdvp, 0);
VOP_UNLOCK(fdvp);
xp = VTODE(fvp);
zp = VTODE(fdvp);
from_diroffset = zp->de_fndoffset;
@ -1079,14 +1079,14 @@ abortit:
error = createde(ip, dp, (struct denode **)0, tcnp);
if (error) {
memcpy(ip->de_Name, oldname, 11);
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
goto bad;
}
ip->de_refcnt++;
zp->de_fndoffset = from_diroffset;
if ((error = removede(zp, ip)) != 0) {
/* XXX should really panic here, fs is corrupt */
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
goto bad;
}
cache_purge(fvp);
@ -1095,7 +1095,7 @@ abortit:
&ip->de_dirclust, 0);
if (error) {
/* XXX should really panic here, fs is corrupt */
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
goto bad;
}
ip->de_diroffset = to_diroffset;
@ -1121,7 +1121,7 @@ abortit:
if (error) {
/* XXX should really panic here, fs is corrupt */
brelse(bp, 0);
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
goto bad;
}
dotdotp = (struct direntry *)bp->b_data + 1;
@ -1134,13 +1134,13 @@ abortit:
}
if ((error = bwrite(bp)) != 0) {
/* XXX should really panic here, fs is corrupt */
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
goto bad;
}
}
VN_KNOTE(fvp, NOTE_RENAME);
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
bad:
if (tvp)
vput(tvp);
@ -1155,7 +1155,7 @@ out:
/* XXX: uuuh */
tdvpbad:
VOP_UNLOCK(tdvp, 0);
VOP_UNLOCK(tdvp);
goto bad;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: nilfs_vfsops.c,v 1.2 2010/05/01 21:21:27 reinoud Exp $ */
/* $NetBSD: nilfs_vfsops.c,v 1.3 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 2008, 2009 Reinoud Zandijk
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.2 2010/05/01 21:21:27 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.3 2010/06/24 13:03:10 hannken Exp $");
#endif /* not lint */
@ -607,7 +607,7 @@ nilfs_mount_device(struct vnode *devvp, struct mount *mp, struct nilfs_args *arg
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = genfs_can_mount(devvp, accessmode, l->l_cred);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
if (error) {
vrele(devvp);
return error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nilfs_vnops.c,v 1.6 2010/06/24 12:15:46 reinoud Exp $ */
/* $NetBSD: nilfs_vnops.c,v 1.7 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 2008, 2009 Reinoud Zandijk
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.6 2010/06/24 12:15:46 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.7 2010/06/24 13:03:10 hannken Exp $");
#endif /* not lint */
@ -81,7 +81,7 @@ nilfs_inactive(void *v)
if (nilfs_node == NULL) {
DPRINTF(NODE, ("nilfs_inactive: inactive NULL NILFS node\n"));
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return 0;
}
@ -90,7 +90,7 @@ nilfs_inactive(void *v)
* referenced anymore in a directory we ought to free up the resources
* on disc if applicable.
*/
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return 0;
}
@ -692,7 +692,7 @@ nilfs_lookup(void *v)
error = ENOENT;
/* first unlock parent */
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
if (error == 0) {
DPRINTF(LOOKUP, ("\tfound '..'\n"));
@ -1188,20 +1188,20 @@ nilfs_do_link(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
error = VOP_GETATTR(vp, &vap, FSCRED);
if (error) {
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return error;
}
/* check link count overflow */
if (vap.va_nlink >= (1<<16)-1) { /* uint16_t */
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return EMLINK;
}
error = nilfs_dir_attach(dir_node->ump, dir_node, nilfs_node,
&vap, cnp);
if (error)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return error;
}
@ -1405,7 +1405,7 @@ nilfs_rename(void *v)
out:
if (fdnode != tdnode)
VOP_UNLOCK(fdvp, 0);
VOP_UNLOCK(fdvp);
out_unlocked:
VOP_ABORTOP(tdvp, tcnp);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntfs_vfsops.c,v 1.80 2010/01/08 11:35:08 pooka Exp $ */
/* $NetBSD: ntfs_vfsops.c,v 1.81 2010/06/24 13:03:10 hannken Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.80 2010/01/08 11:35:08 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.81 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -277,7 +277,7 @@ ntfs_mount (
if (err) {
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(devvp, flags, NOCRED);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
goto fail;
}
}
@ -315,7 +315,7 @@ ntfs_mountfs(struct vnode *devvp, struct mount *mp, struct ntfs_args *argsp, str
*/
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(devvp, V_SAVE, l->l_cred, l, 0, 0);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
if (error)
return (error);
@ -539,7 +539,7 @@ ntfs_unmount(
error = VOP_CLOSE(ntmp->ntm_devvp, ronly ? FREAD : FREAD|FWRITE,
NOCRED);
KASSERT(error == 0);
VOP_UNLOCK(ntmp->ntm_devvp, 0);
VOP_UNLOCK(ntmp->ntm_devvp);
vrele(ntmp->ntm_devvp);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntfs_vnops.c,v 1.46 2010/01/08 11:35:08 pooka Exp $ */
/* $NetBSD: ntfs_vnops.c,v 1.47 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 1992, 1993
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ntfs_vnops.c,v 1.46 2010/01/08 11:35:08 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: ntfs_vnops.c,v 1.47 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -215,7 +215,7 @@ ntfs_inactive(void *v)
dprintf(("ntfs_inactive: vnode: %p, ntnode: %llu\n", vp,
(unsigned long long)ip->i_number));
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
/* XXX since we don't support any filesystem changes
* right now, nothing more needs to be done
@ -699,7 +699,7 @@ ntfs_lookup(void *v)
dprintf(("ntfs_lookup: faking .. directory in %llu\n",
(unsigned long long)dip->i_number));
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
error = ntfs_ntvattrget(ntmp, dip, NTFS_A_NAME, NULL, 0, &vap);
if (error) {
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ptyfs_subr.c,v 1.18 2009/03/24 22:05:24 haad Exp $ */
/* $NetBSD: ptyfs_subr.c,v 1.19 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 1993
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.18 2009/03/24 22:05:24 haad Exp $");
__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.19 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -148,7 +148,7 @@ ptyfs_getinfo(struct ptyfsnode *ptyfs, struct lwp *l)
cred = kauth_cred_alloc();
error = VOP_GETATTR(nd.ni_vp, &va, cred);
kauth_cred_free(cred);
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
vrele(nd.ni_vp);
if (error)
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ptyfs_vnops.c,v 1.33 2010/01/08 11:35:09 pooka Exp $ */
/* $NetBSD: ptyfs_vnops.c,v 1.34 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 1993, 1995
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.33 2010/01/08 11:35:09 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.34 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -794,7 +794,7 @@ ptyfs_read(void *v)
switch (ptyfs->ptyfs_type) {
case PTYFSpts:
case PTYFSptc:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
error = cdev_read(vp->v_rdev, ap->a_uio, ap->a_ioflag);
vn_lock(vp, LK_RETRY|LK_EXCLUSIVE);
return error;
@ -824,7 +824,7 @@ ptyfs_write(void *v)
switch (ptyfs->ptyfs_type) {
case PTYFSpts:
case PTYFSptc:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
error = cdev_write(vp->v_rdev, ap->a_uio, ap->a_ioflag);
vn_lock(vp, LK_RETRY|LK_EXCLUSIVE);
return error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_vfsops.c,v 1.89 2010/05/21 10:40:19 pooka Exp $ */
/* $NetBSD: puffs_vfsops.c,v 1.90 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.89 2010/05/21 10:40:19 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.90 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@ -795,7 +795,7 @@ puffs_vfsop_extattrctl(struct mount *mp, int cmd, struct vnode *vp,
mutex_enter(&pnp->pn_mtx);
puffs_referencenode(pnp);
mutex_exit(&pnp->pn_mtx);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
}
error = puffs_msg_wait2(pmp, park_extattrctl, pnp, NULL);
PUFFS_MSG_RELEASE(extattrctl);

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_vnops.c,v 1.145 2010/05/21 10:16:54 pooka Exp $ */
/* $NetBSD: puffs_vnops.c,v 1.146 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.145 2010/05/21 10:16:54 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.146 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@ -511,7 +511,7 @@ puffs_vnop_lookup(void *v)
cnp, PUFFS_USE_FULLPNBUF(pmp));
if (cnp->cn_flags & ISDOTDOT)
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
puffs_msg_setinfo(park_lookup, PUFFSOP_VN,
PUFFS_VN_LOOKUP, VPTOPNC(dvp));
@ -612,7 +612,7 @@ do { \
mutex_enter(&b->pn_mtx); \
puffs_referencenode(b); \
mutex_exit(&b->pn_mtx); \
VOP_UNLOCK(a, 0); \
VOP_UNLOCK(a); \
} while (/*CONSTCOND*/0)
#define REFPN(b) \
@ -1054,7 +1054,7 @@ puffs_vnop_inactive(void *v)
*ap->a_recycle = true;
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: smbfs_node.c,v 1.42 2009/10/19 19:12:06 pooka Exp $ */
/* $NetBSD: smbfs_node.c,v 1.43 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smbfs_node.c,v 1.42 2009/10/19 19:12:06 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: smbfs_node.c,v 1.43 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -305,7 +305,7 @@ smbfs_inactive(void *v)
np->n_flag &= ~NOPEN;
smbfs_attr_cacheremove(vp);
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
*ap->a_recycle = false; /* XXX: should set the value properly */

View File

@ -1,4 +1,4 @@
/* $NetBSD: smbfs_vfsops.c,v 1.90 2009/09/07 15:12:03 njoly Exp $ */
/* $NetBSD: smbfs_vfsops.c,v 1.91 2010/06/24 13:03:10 hannken Exp $ */
/*
* Copyright (c) 2000-2001, Boris Popov
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smbfs_vfsops.c,v 1.90 2009/09/07 15:12:03 njoly Exp $");
__KERNEL_RCSID(0, "$NetBSD: smbfs_vfsops.c,v 1.91 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -309,7 +309,7 @@ smbfs_setroot(struct mount *mp)
smp->sm_root = VTOSMB(vp);
/* Keep reference, but unlock */
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
}
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: smbfs_vnops.c,v 1.74 2010/01/08 11:35:09 pooka Exp $ */
/* $NetBSD: smbfs_vnops.c,v 1.75 2010/06/24 13:03:10 hannken Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.74 2010/01/08 11:35:09 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: smbfs_vnops.c,v 1.75 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1322,7 +1322,7 @@ smbfs_lookup(void *v)
if (isdot)
return (EISDIR);
if (flags & ISDOTDOT)
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
error = smbfs_nget(mp, dvp, name, nmlen, &fattr, vpp);
if (flags & ISDOTDOT)
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
@ -1344,7 +1344,7 @@ smbfs_lookup(void *v)
/*
* ".." lookup
*/
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
error = smbfs_nget(mp, dvp, name, nmlen, NULL, vpp);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysvbfs_vfsops.c,v 1.31 2009/12/01 09:28:02 pooka Exp $ */
/* $NetBSD: sysvbfs_vfsops.c,v 1.32 2010/06/24 13:03:10 hannken Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.31 2009/12/01 09:28:02 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.32 2010/06/24 13:03:10 hannken Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -212,7 +212,7 @@ sysvbfs_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l)
out:
if (devopen && error)
VOP_CLOSE(devvp, oflags, NOCRED);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysvbfs_vnops.c,v 1.30 2010/05/27 23:40:12 pooka Exp $ */
/* $NetBSD: sysvbfs_vnops.c,v 1.31 2010/06/24 13:03:10 hannken Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.30 2010/05/27 23:40:12 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.31 2010/06/24 13:03:10 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -630,7 +630,7 @@ sysvbfs_inactive(void *arg)
*a->a_recycle = true;
else
*a->a_recycle = false;
VOP_UNLOCK(v, 0);
VOP_UNLOCK(v);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tmpfs_vnops.c,v 1.70 2010/06/22 18:32:08 rmind Exp $ */
/* $NetBSD: tmpfs_vnops.c,v 1.71 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.70 2010/06/22 18:32:08 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.71 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/dirent.h>
@ -155,7 +155,7 @@ tmpfs_lookup(void *v)
!(cnp->cn_flags & ISDOTDOT)));
if (cnp->cn_flags & ISDOTDOT) {
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
/* Allocate a new vnode on the matching entry. */
error = tmpfs_alloc_vp(dvp->v_mount,
@ -795,7 +795,7 @@ tmpfs_link(void *v)
error = 0;
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
PNBUF_PUT(cnp->cn_pnbuf);
vput(dvp);
@ -1007,7 +1007,7 @@ tmpfs_rename(void *v)
out:
if (fdnode != tdnode)
VOP_UNLOCK(fdvp, 0);
VOP_UNLOCK(fdvp);
out_unlocked:
/* Release target nodes. */
@ -1277,7 +1277,7 @@ tmpfs_inactive(void *v)
node = VP_TO_TMPFS_NODE(vp);
*((struct vop_inactive_args *)v)->a_recycle = (node->tn_links == 0);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf_vfsops.c,v 1.59 2009/07/07 10:23:36 reinoud Exp $ */
/* $NetBSD: udf_vfsops.c,v 1.60 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.59 2009/07/07 10:23:36 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.60 2010/06/24 13:03:11 hannken Exp $");
#endif /* not lint */
@ -381,7 +381,7 @@ udf_mount(struct mount *mp, const char *path,
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = genfs_can_mount(devvp, accessmode, l->l_cred);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
if (error) {
vrele(devvp);
return error;
@ -406,7 +406,7 @@ udf_mount(struct mount *mp, const char *path,
free_udf_mountinfo(mp);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void) VOP_CLOSE(devvp, openflags, NOCRED);
VOP_UNLOCK(devvp, 0);
VOP_UNLOCK(devvp);
}
}
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf_vnops.c,v 1.58 2010/06/24 07:54:46 hannken Exp $ */
/* $NetBSD: udf_vnops.c,v 1.59 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.58 2010/06/24 07:54:46 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.59 2010/06/24 13:03:11 hannken Exp $");
#endif /* not lint */
@ -87,7 +87,7 @@ udf_inactive(void *v)
if (udf_node == NULL) {
DPRINTF(NODE, ("udf_inactive: inactive NULL UDF node\n"));
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return 0;
}
@ -115,7 +115,7 @@ udf_inactive(void *v)
DPRINTF(NODE, ("udf_inactive deleting unlinked file\n"));
*ap->a_recycle = true;
udf_delete_node(udf_node);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
vrecycle(vp, NULL, curlwp);
return 0;
}
@ -123,7 +123,7 @@ udf_inactive(void *v)
/* write out its node */
if (udf_node->i_flags & (IN_CHANGE | IN_UPDATE | IN_MODIFIED))
udf_update(vp, NULL, NULL, NULL, 0);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return 0;
}
@ -722,7 +722,7 @@ udf_lookup(void *v)
error = ENOENT;
/* first unlock parent */
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
if (error == 0) {
DPRINTF(LOOKUP, ("\tfound '..'\n"));
@ -1510,19 +1510,19 @@ udf_do_link(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
error = VOP_GETATTR(vp, &vap, FSCRED);
if (error) {
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return error;
}
/* check link count overflow */
if (vap.va_nlink >= (1<<16)-1) { /* uint16_t */
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return EMLINK;
}
error = udf_dir_attach(dir_node->ump, dir_node, udf_node, &vap, cnp);
if (error)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return error;
}
@ -2090,7 +2090,7 @@ udf_rename(void *v)
out:
if (fdnode != tdnode)
VOP_UNLOCK(fdvp, 0);
VOP_UNLOCK(fdvp);
out_unlocked:
VOP_ABORTOP(tdvp, tcnp);

View File

@ -1,4 +1,4 @@
/* $NetBSD: union_subr.c,v 1.36 2010/06/06 08:01:31 hannken Exp $ */
/* $NetBSD: union_subr.c,v 1.37 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 1994
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.36 2010/06/06 08:01:31 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.37 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -639,9 +639,9 @@ union_copyfile(struct vnode *fvp, struct vnode *tvp, kauth_cred_t cred,
uio.uio_offset = 0;
UIO_SETUP_SYSSPACE(&uio);
VOP_UNLOCK(fvp, 0); /* XXX */
VOP_UNLOCK(fvp); /* XXX */
vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY); /* XXX */
VOP_UNLOCK(tvp, 0); /* XXX */
VOP_UNLOCK(tvp); /* XXX */
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); /* XXX */
tbuf = malloc(MAXBSIZE, M_TEMP, M_WAITOK);
@ -724,7 +724,7 @@ union_copyup(struct union_node *un, int docopy, kauth_cred_t cred,
uvattr.va_flags = lvattr.va_flags;
error = VOP_SETATTR(uvp, &uvattr, cred);
}
VOP_UNLOCK(lvp, 0);
VOP_UNLOCK(lvp);
#ifdef UNION_DIAGNOSTIC
if (error == 0)
uprintf("union: copied up %s\n", un->un_path);
@ -750,7 +750,7 @@ union_copyup(struct union_node *un, int docopy, kauth_cred_t cred,
(void) VOP_OPEN(uvp, FREAD, cred);
}
un->un_openl = 0;
VOP_UNLOCK(lvp, 0);
VOP_UNLOCK(lvp);
}
return (error);
@ -833,14 +833,14 @@ union_mkshadow(struct union_mount *um, struct vnode *dvp,
error = union_relookup(um, dvp, vpp, cnp, &cn,
cnp->cn_nameptr, cnp->cn_namelen);
if (error) {
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
return (error);
}
if (*vpp) {
VOP_ABORTOP(dvp, &cn);
if (dvp != *vpp)
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
vput(*vpp);
*vpp = NULLVP;
return (EEXIST);
@ -880,7 +880,7 @@ union_mkwhiteout(struct union_mount *um, struct vnode *dvp,
struct vnode *wvp;
struct componentname cn;
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
error = union_relookup(um, dvp, &wvp, cnp, &cn, path, strlen(path));
if (error)
@ -889,7 +889,7 @@ union_mkwhiteout(struct union_mount *um, struct vnode *dvp,
if (wvp) {
VOP_ABORTOP(dvp, &cn);
if (dvp != wvp)
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
vput(wvp);
return (EEXIST);
}
@ -947,14 +947,14 @@ union_vn_create(struct vnode **vpp, struct union_node *un, struct lwp *l)
vn_lock(un->un_dirvp, LK_EXCLUSIVE | LK_RETRY);
error = relookup(un->un_dirvp, &vp, &cn);
if (error) {
VOP_UNLOCK(un->un_dirvp, 0);
VOP_UNLOCK(un->un_dirvp);
return (error);
}
if (vp) {
VOP_ABORTOP(un->un_dirvp, &cn);
if (un->un_dirvp != vp)
VOP_UNLOCK(un->un_dirvp, 0);
VOP_UNLOCK(un->un_dirvp);
vput(vp);
return (EEXIST);
}
@ -1020,7 +1020,7 @@ union_removed_upper(struct union_node *un)
if (un->un_flags & UN_ULOCK) {
un->un_flags &= ~UN_ULOCK;
VOP_UNLOCK(un->un_uppervp, 0);
VOP_UNLOCK(un->un_uppervp);
}
}
@ -1130,7 +1130,7 @@ union_dircache(struct vnode *vp, struct lwp *l)
}
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (nvp);
}
@ -1179,7 +1179,7 @@ union_readdirhook(struct vnode **vpp, struct file *fp, struct lwp *l)
vput(lvp);
return (error);
}
VOP_UNLOCK(lvp, 0);
VOP_UNLOCK(lvp);
fp->f_data = lvp;
fp->f_offset = 0;
error = vn_close(vp, FREAD, fp->f_cred);

View File

@ -1,4 +1,4 @@
/* $NetBSD: union_vnops.c,v 1.35 2010/05/01 10:44:59 pooka Exp $ */
/* $NetBSD: union_vnops.c,v 1.36 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 1992, 1993, 1994, 1995
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.35 2010/05/01 10:44:59 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.36 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -231,7 +231,7 @@ union_lookup1(struct vnode *udvp, struct vnode **dvpp, struct vnode **vpp,
*/
tdvp = dvp;
*dvpp = dvp = dvp->v_mount->mnt_vnodecovered;
VOP_UNLOCK(tdvp, 0);
VOP_UNLOCK(tdvp);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
}
}
@ -329,7 +329,7 @@ union_lookup(void *v)
if (cnp->cn_flags & ISDOTDOT) {
/* retain lock on underlying VP */
dun->un_flags |= UN_KLOCK;
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
}
uerror = union_lookup1(um->um_uppervp, &upperdvp,
&uppervp, cnp);
@ -406,7 +406,7 @@ union_lookup(void *v)
cnp->cn_nameiop = nameiop;
if (lowervp != lowerdvp)
VOP_UNLOCK(lowerdvp, 0);
VOP_UNLOCK(lowerdvp);
if (cnp->cn_consume != 0) {
if (uppervp != NULLVP) {
@ -486,7 +486,7 @@ union_lookup(void *v)
*/
if (upperdvp) {
dun->un_flags &= ~UN_ULOCK;
VOP_UNLOCK(upperdvp, 0);
VOP_UNLOCK(upperdvp);
uerror = union_mkshadow(um, upperdvp, cnp,
&uppervp);
vn_lock(upperdvp, LK_EXCLUSIVE | LK_RETRY);
@ -503,7 +503,7 @@ union_lookup(void *v)
}
if (lowervp != NULLVP)
VOP_UNLOCK(lowervp, 0);
VOP_UNLOCK(lowervp);
error = union_allocvp(ap->a_vpp, dvp->v_mount, dvp, upperdvp, cnp,
uppervp, lowervp, 1);
@ -657,7 +657,7 @@ union_open(void *v)
un->un_openl++;
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_OPEN(tvp, mode, cred);
VOP_UNLOCK(tvp, 0);
VOP_UNLOCK(tvp);
return (error);
}
@ -768,7 +768,7 @@ union_access(void *v)
error = VCALL(vp, VOFFSET(vop_access), ap);
}
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (error)
return (error);
}
@ -955,7 +955,7 @@ union_read(void *v)
FIXUP(VTOUNION(ap->a_vp));
error = VOP_READ(vp, ap->a_uio, ap->a_ioflag, ap->a_cred);
if (dolock)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
/*
* XXX
@ -1109,7 +1109,7 @@ union_fsync(void *v)
error = VOP_FSYNC(targetvp, ap->a_cred, ap->a_flags,
ap->a_offlo, ap->a_offhi);
if (dolock)
VOP_UNLOCK(targetvp, 0);
VOP_UNLOCK(targetvp);
}
return (error);
@ -1211,7 +1211,7 @@ union_link(void *v)
vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY);
if (dun->un_uppervp == un->un_dirvp) {
dun->un_flags &= ~UN_ULOCK;
VOP_UNLOCK(dun->un_uppervp, 0);
VOP_UNLOCK(dun->un_uppervp);
}
error = union_copyup(un, 1, cnp->cn_cred, curlwp);
if (dun->un_uppervp == un->un_dirvp) {
@ -1230,7 +1230,7 @@ union_link(void *v)
panic("union: null upperdvp?");
error = relookup(ap->a_dvp, &vp, ap->a_cnp);
if (error) {
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
return EROFS; /* ? */
}
if (vp != NULLVP) {
@ -1239,13 +1239,13 @@ union_link(void *v)
* mysteriously appeared (a race?)
*/
error = EEXIST;
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
vput(ap->a_dvp);
vput(vp);
return (error);
}
}
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
}
vp = un->un_uppervp;
}
@ -1387,7 +1387,7 @@ union_mkdir(void *v)
FIXUP(un);
vref(dvp);
un->un_flags |= UN_KLOCK;
VOP_UNLOCK(ap->a_dvp, 0);
VOP_UNLOCK(ap->a_dvp);
error = VOP_MKDIR(dvp, &vp, cnp, ap->a_vap);
if (error) {
vrele(ap->a_dvp);
@ -1531,7 +1531,7 @@ union_readlink(void *v)
ap->a_vp = vp;
error = VCALL(vp, VOFFSET(vop_readlink), ap);
if (dolock)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (error);
}
@ -1558,7 +1558,7 @@ union_abortop(void *v)
ap->a_dvp = vp;
error = VCALL(vp, VOFFSET(vop_abortop), ap);
if (islocked && dolock)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (error);
}
@ -1596,7 +1596,7 @@ union_inactive(void *v)
}
*ap->a_recycle = ((un->un_flags & UN_CACHED) == 0);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (0);
}
@ -1722,7 +1722,7 @@ union_unlock(void *v)
un->un_flags &= ~UN_LOCKED;
if ((un->un_flags & (UN_ULOCK|UN_KLOCK)) == UN_ULOCK)
VOP_UNLOCK(un->un_uppervp, 0);
VOP_UNLOCK(un->un_uppervp);
un->un_flags &= ~(UN_ULOCK|UN_KLOCK);
@ -1760,7 +1760,7 @@ union_bmap(void *v)
ap->a_vp = vp;
error = VCALL(vp, VOFFSET(vop_bmap), ap);
if (dolock)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (error);
}
@ -1817,7 +1817,7 @@ union_pathconf(void *v)
ap->a_vp = vp;
error = VCALL(vp, VOFFSET(vop_pathconf), ap);
if (dolock)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
return (error);
}

View File

@ -320,7 +320,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp,
cn->cn_flags |= (cnp->cn_flags & SAVESTART);
vref(dvp);
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
if ((error = relookup(dvp, vpp, cn))) {
PNBUF_PUT(cn->cn_pnbuf);
@ -663,7 +663,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp,
*vpp = vp;
unionfs_vn_create_on_upper_free_out1:
VOP_UNLOCK(udvp, 0);
VOP_UNLOCK(udvp);
unionfs_vn_create_on_upper_free_out2:
if (cn.cn_flags & HASBUF) {

View File

@ -137,7 +137,7 @@ unionfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
uid = va.va_uid;
gid = va.va_gid;
}
VOP_UNLOCK(mp->mnt_vnodecovered, 0);
VOP_UNLOCK(mp->mnt_vnodecovered);
if (error)
return (error);
@ -187,7 +187,7 @@ unionfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
* Save reference
*/
if (below) {
VOP_UNLOCK(upperrootvp, 0);
VOP_UNLOCK(upperrootvp);
vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY);
ump->um_lowervp = upperrootvp;
ump->um_uppervp = lowerrootvp;
@ -222,7 +222,7 @@ unionfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
error = VOP_WHITEOUT(ump->um_uppervp, &fakecn, LOOKUP);
if (error) {
if (below) {
VOP_UNLOCK(ump->um_uppervp, 0);
VOP_UNLOCK(ump->um_uppervp);
vrele(upperrootvp);
} else
vput(ump->um_uppervp);
@ -235,7 +235,7 @@ unionfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
/*
* Unlock the node
*/
VOP_UNLOCK(ump->um_uppervp, 0);
VOP_UNLOCK(ump->um_uppervp);
ump->um_op = args->mntflags & UNMNT_OPMASK;

View File

@ -113,7 +113,7 @@ unionfs_lookup(void *v)
if (udvp != NULLVP) {
dtmpvp = udvp;
if (ldvp != NULLVP)
VOP_UNLOCK(ldvp, 0);
VOP_UNLOCK(ldvp);
}
else
dtmpvp = ldvp;
@ -121,7 +121,7 @@ unionfs_lookup(void *v)
error = VOP_LOOKUP(dtmpvp, &vp, cnp);
if (dtmpvp == udvp && ldvp != NULLVP) {
VOP_UNLOCK(udvp, 0);
VOP_UNLOCK(udvp);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
}
@ -132,10 +132,10 @@ unionfs_lookup(void *v)
* will need to return the unionfs vnode.
*/
if (nameiop == DELETE || nameiop == RENAME)
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
vrele(vp);
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
*(ap->a_vpp) = dunp->un_dvp;
vref(dunp->un_dvp);
@ -206,7 +206,7 @@ unionfs_lookup(void *v)
UNIONFS_INTERNAL_DEBUG("unionfs_lookup: leave (%d)\n", lerror);
if (uvp != NULL)
VOP_UNLOCK(uvp, 0);
VOP_UNLOCK(uvp);
return (lerror);
}
}
@ -799,7 +799,7 @@ unionfs_ioctl(void *v)
unionfs_get_node_status(unp, &unsp);
ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp);
unionfs_tryrem_node_status(unp, unsp);
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
if (ovp == NULLVP)
return (EBADF);
@ -825,7 +825,7 @@ unionfs_poll(void *v)
unionfs_get_node_status(unp, &unsp);
ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp);
unionfs_tryrem_node_status(unp, unsp);
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
if (ovp == NULLVP)
return (EBADF);
@ -1032,7 +1032,7 @@ unionfs_rename(void *v)
if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
goto unionfs_rename_abort;
error = unionfs_copyfile(unp, 1, fcnp->cn_cred);
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
if (error != 0)
goto unionfs_rename_abort;
break;
@ -1040,7 +1040,7 @@ unionfs_rename(void *v)
if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
goto unionfs_rename_abort;
error = unionfs_mkshadowdir(ump, rfdvp, unp, fcnp);
VOP_UNLOCK(fvp, 0);
VOP_UNLOCK(fvp);
if (error != 0)
goto unionfs_rename_abort;
break;
@ -1094,13 +1094,13 @@ unionfs_rename(void *v)
if ((error = vn_lock(fdvp, LK_EXCLUSIVE)) != 0)
goto unionfs_rename_abort;
error = unionfs_relookup_for_delete(fdvp, fcnp);
VOP_UNLOCK(fdvp, 0);
VOP_UNLOCK(fdvp);
if (error != 0)
goto unionfs_rename_abort;
/* Locke of tvp is canceled in order to avoid recursive lock. */
if (tvp != NULLVP && tvp != tdvp)
VOP_UNLOCK(tvp, 0);
VOP_UNLOCK(tvp);
error = unionfs_relookup_for_rename(tdvp, tcnp);
if (tvp != NULLVP && tvp != tdvp)
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
@ -1122,11 +1122,11 @@ unionfs_rename(void *v)
if (fvp != rfvp)
vrele(fvp);
if (ltdvp != NULLVP)
VOP_UNLOCK(ltdvp, 0);
VOP_UNLOCK(ltdvp);
if (tdvp != rtdvp)
vrele(tdvp);
if (ltvp != NULLVP)
VOP_UNLOCK(ltvp, 0);
VOP_UNLOCK(ltvp);
if (tvp != rtvp && tvp != NULLVP) {
if (rtvp == NULLVP)
vput(tvp);
@ -1335,7 +1335,7 @@ unionfs_readdir(void *v)
}
/* check the open count. unionfs needs to open before readdir. */
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY);
unionfs_get_node_status(unp, &unsp);
if ((uvp != NULLVP && unsp->uns_upper_opencnt <= 0) ||
@ -1471,7 +1471,7 @@ unionfs_inactive(void *v)
{
struct vop_inactive_args *ap = v;
*ap->a_recycle = true;
VOP_UNLOCK(ap->a_vp, 0);
VOP_UNLOCK(ap->a_vp);
return (0);
}
@ -1536,7 +1536,7 @@ unionfs_lock(void *v)
if (error == 0 && uvp != NULLVP) {
error = VOP_LOCK(uvp, flags);
if (error != 0) {
VOP_UNLOCK(lvp, 0);
VOP_UNLOCK(lvp);
}
}
@ -1558,10 +1558,10 @@ unionfs_unlock(void *v)
error = 0;
if (lvp != NULLVP) {
error = VOP_UNLOCK(lvp, ap->a_flags);
error = VOP_UNLOCK(lvp);
}
if (error == 0 && uvp != NULLVP) {
error = VOP_UNLOCK(uvp, ap->a_flags);
error = VOP_UNLOCK(uvp);
}
return error;
@ -1620,7 +1620,7 @@ unionfs_advlock(void *v)
unionfs_tryrem_node_status(unp, unsp);
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
error = VOP_ADVLOCK(uvp, ap->a_id, ap->a_op, ap->a_fl, ap->a_flags);
@ -1629,7 +1629,7 @@ unionfs_advlock(void *v)
return error;
unionfs_advlock_abort:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
UNIONFS_INTERNAL_DEBUG("unionfs_advlock: leave (%d)\n", error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: exec_elf.c,v 1.22 2010/06/06 06:20:16 dholland Exp $ */
/* $NetBSD: exec_elf.c,v 1.23 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.22 2010/06/06 06:20:16 dholland Exp $");
__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.23 2010/06/24 13:03:11 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@ -460,7 +460,7 @@ elf_load_file(struct lwp *l, struct exec_package *epp, char *path,
if (error)
goto badunlock;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if ((error = exec_read_from(l, vp, 0, &eh, sizeof(eh))) != 0)
goto bad;
@ -610,7 +610,7 @@ elf_load_file(struct lwp *l, struct exec_package *epp, char *path,
return 0;
badunlock:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
bad:
if (ph != NULL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: exec_macho.c,v 1.42 2008/04/28 20:24:02 martin Exp $ */
/* $NetBSD: exec_macho.c,v 1.43 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: exec_macho.c,v 1.42 2008/04/28 20:24:02 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: exec_macho.c,v 1.43 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -328,7 +328,7 @@ exec_macho_load_file(struct lwp *l, struct exec_package *epp,
#ifdef notyet /* XXX cgd 960926 */
XXX cgd 960926: (maybe) VOP_OPEN it (and VOP_CLOSE in copyargs?)
#endif
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if ((error = exec_read_from(l, vp, 0, &fat, sizeof(fat))) != 0)
goto bad;
@ -341,7 +341,7 @@ exec_macho_load_file(struct lwp *l, struct exec_package *epp,
return 0;
badunlock:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
bad:
#ifdef notyet /* XXX cgd 960926 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: exec_script.c,v 1.64 2010/05/02 05:30:20 dholland Exp $ */
/* $NetBSD: exec_script.c,v 1.65 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.64 2010/05/02 05:30:20 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.65 2010/06/24 13:03:11 hannken Exp $");
#if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS)
#define FDSCRIPTS /* Need this for safe set-id scripts. */
@ -220,7 +220,7 @@ check_shell:
*/
vn_lock(epp->ep_vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_ACCESS(epp->ep_vp, VREAD, l->l_cred);
VOP_UNLOCK(epp->ep_vp, 0);
VOP_UNLOCK(epp->ep_vp);
if (error == EACCES
#ifdef SETUIDSCRIPTS
|| script_sbits

View File

@ -1,4 +1,4 @@
/* $NetBSD: exec_subr.c,v 1.63 2009/12/10 14:13:54 matt Exp $ */
/* $NetBSD: exec_subr.c,v 1.64 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: exec_subr.c,v 1.63 2009/12/10 14:13:54 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: exec_subr.c,v 1.64 2010/06/24 13:03:11 hannken Exp $");
#include "opt_pax.h"
@ -191,7 +191,7 @@ vmcmd_map_pagedvn(struct lwp *l, struct exec_vmcmd *cmd)
if ((vp->v_vflag & VV_MAPPED) == 0) {
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
vp->v_vflag |= VV_MAPPED;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_acct.c,v 1.88 2010/01/08 11:35:09 pooka Exp $ */
/* $NetBSD: kern_acct.c,v 1.89 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_acct.c,v 1.88 2010/01/08 11:35:09 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_acct.c,v 1.89 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -310,12 +310,12 @@ sys_acct(struct lwp *l, const struct sys_acct_args *uap, register_t *retval)
if ((error = vn_open(&nd, FWRITE|O_APPEND, 0)) != 0)
return (error);
if (nd.ni_vp->v_type != VREG) {
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
error = EACCES;
goto bad;
}
if ((error = VOP_GETATTR(nd.ni_vp, &va, l->l_cred)) != 0) {
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
goto bad;
}
@ -330,11 +330,11 @@ sys_acct(struct lwp *l, const struct sys_acct_args *uap, register_t *retval)
va.va_size = size;
error = VOP_SETATTR(nd.ni_vp, &va, l->l_cred);
if (error != 0) {
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
goto bad;
}
}
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
}
rw_enter(&acct_lock, RW_WRITER);

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_core.c,v 1.15 2010/01/08 11:35:10 pooka Exp $ */
/* $NetBSD: kern_core.c,v 1.16 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.15 2010/01/08 11:35:10 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.16 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/vnode.h>
@ -206,7 +206,7 @@ coredump(struct lwp *l, const char *pattern)
/* Now dump the actual core file. */
error = (*p->p_execsw->es_coredump)(l, &io);
out:
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
error1 = vn_close(vp, FWRITE, cred);
if (error == 0)
error = error1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_exec.c,v 1.297 2010/05/12 03:40:38 rmind Exp $ */
/* $NetBSD: kern_exec.c,v 1.298 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.297 2010/05/12 03:40:38 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.298 2010/06/24 13:03:11 hannken Exp $");
#include "opt_ktrace.h"
#include "opt_modular.h"
@ -327,7 +327,7 @@ check_exec(struct lwp *l, struct exec_package *epp, const char *kpath)
goto bad1;
/* unlock vp, since we need it unlocked from here on out. */
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
#if NVERIEXEC > 0
error = veriexec_verify(l, vp, epp->ep_resolvedname,

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_ktrace.c,v 1.151 2010/03/03 00:47:30 yamt Exp $ */
/* $NetBSD: kern_ktrace.c,v 1.152 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.151 2010/03/03 00:47:30 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.152 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1295,7 +1295,7 @@ sys_ktrace(struct lwp *l, const struct sys_ktrace_args *uap, register_t *retval)
return (error);
}
vp = nd.ni_vp;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
if (vp->v_type != VREG) {
vn_close(vp, FREAD|FWRITE, l->l_cred);
ktrexit(l);

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_module_vfs.c,v 1.6 2010/05/24 16:37:17 pgoyette Exp $ */
/* $NetBSD: kern_module_vfs.c,v 1.7 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.6 2010/05/24 16:37:17 pgoyette Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.7 2010/06/24 13:03:11 hannken Exp $");
#define _MODULE_INTERNAL
#include <sys/param.h>
@ -194,7 +194,7 @@ module_load_plist_vfs(const char *modpath, const bool nochroot,
KASSERT(error == 0);
out:
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
vn_close(nd.ni_vp, FREAD, kauth_cred_get());
out1:

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_exec_fd.c,v 1.2 2009/05/24 21:41:26 ad Exp $ */
/* $NetBSD: subr_exec_fd.c,v 1.3 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_exec_fd.c,v 1.2 2009/05/24 21:41:26 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_exec_fd.c,v 1.3 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/file.h>
@ -142,7 +142,7 @@ fd_checkstd(void)
fp->f_flag = flags;
fp->f_ops = &vnops;
fp->f_type = DTYPE_VNODE;
VOP_UNLOCK(nd.ni_vp, 0);
VOP_UNLOCK(nd.ni_vp);
fd_affix(p, fp, fd);
}
if (closed[0] != '\0') {

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_kobj_vfs.c,v 1.2 2010/01/19 22:17:44 pooka Exp $ */
/* $NetBSD: subr_kobj_vfs.c,v 1.3 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -72,13 +72,13 @@
#include <sys/vnode.h>
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_kobj_vfs.c,v 1.2 2010/01/19 22:17:44 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_kobj_vfs.c,v 1.3 2010/06/24 13:03:11 hannken Exp $");
static void
kobj_close_vfs(kobj_t ko)
{
VOP_UNLOCK(ko->ko_source, 0);
VOP_UNLOCK(ko->ko_source);
vn_close(ko->ko_source, FREAD, kauth_cred_get());
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_aio.c,v 1.33 2010/06/13 04:45:50 yamt Exp $ */
/* $NetBSD: sys_aio.c,v 1.34 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 2007 Mindaugas Rasiukevicius <rmind at NetBSD org>
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sys_aio.c,v 1.33 2010/06/13 04:45:50 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: sys_aio.c,v 1.34 2010/06/24 13:03:11 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@ -432,7 +432,7 @@ aio_process(struct aio_job *a_job)
error = VOP_FSYNC(vp, fp->f_cred,
FSYNC_WAIT, 0, 0);
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
fd_putfile(fd);
/* Store the result value */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tty_ptm.c,v 1.26 2009/01/22 14:38:35 yamt Exp $ */
/* $NetBSD: tty_ptm.c,v 1.27 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tty_ptm.c,v 1.26 2009/01/22 14:38:35 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: tty_ptm.c,v 1.27 2010/06/24 13:03:11 hannken Exp $");
#include "opt_ptm.h"
@ -174,7 +174,7 @@ retry:
fp->f_type = DTYPE_VNODE;
fp->f_ops = &vnops;
fp->f_data = vp;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
fd_affix(curproc, fp, *fd);
return 0;
bad:
@ -209,12 +209,12 @@ pty_grant_slave(struct lwp *l, dev_t dev)
error = VOP_SETATTR(vp, &vattr, lwp0.l_cred);
if (error) {
DPRINTF(("setattr %d\n", error));
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
vrele(vp);
return error;
}
}
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
VOP_REVOKE(vp, REVOKEALL);
/*
@ -251,7 +251,7 @@ pty_alloc_slave(struct lwp *l, int *fd, dev_t dev)
fp->f_type = DTYPE_VNODE;
fp->f_ops = &vnops;
fp->f_data = vp;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
fd_affix(curproc, fp, *fd);
return 0;
bad:

View File

@ -1,4 +1,4 @@
/* $NetBSD: tty_tty.c,v 1.37 2008/04/24 15:35:30 ad Exp $ */
/* $NetBSD: tty_tty.c,v 1.38 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993, 1995
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tty_tty.c,v 1.37 2008/04/24 15:35:30 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: tty_tty.c,v 1.38 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -75,7 +75,7 @@ cttyopen(dev_t dev, int flag, int mode, struct lwp *l)
if (!error)
#endif /* PARANOID */
error = VOP_OPEN(ttyvp, flag, NOCRED);
VOP_UNLOCK(ttyvp, 0);
VOP_UNLOCK(ttyvp);
return (error);
}
@ -90,7 +90,7 @@ cttyread(dev_t dev, struct uio *uio, int flag)
return (EIO);
vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_READ(ttyvp, uio, flag, NOCRED);
VOP_UNLOCK(ttyvp, 0);
VOP_UNLOCK(ttyvp);
return (error);
}
@ -105,7 +105,7 @@ cttywrite(dev_t dev, struct uio *uio, int flag)
return (EIO);
vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_WRITE(ttyvp, uio, flag, NOCRED);
VOP_UNLOCK(ttyvp, 0);
VOP_UNLOCK(ttyvp);
return (error);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_usrreq.c,v 1.129 2010/02/09 23:05:16 wiz Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.130 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.129 2010/02/09 23:05:16 wiz Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.130 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -923,7 +923,7 @@ unp_bind(struct socket *so, struct mbuf *nam, struct lwp *l)
unp->unp_connid.unp_euid = kauth_cred_geteuid(l->l_cred);
unp->unp_connid.unp_egid = kauth_cred_getegid(l->l_cred);
unp->unp_flags |= UNP_EIDSBIND;
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
unp->unp_flags &= ~UNP_BUSY;
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_cache.c,v 1.84 2009/02/18 13:36:11 yamt Exp $ */
/* $NetBSD: vfs_cache.c,v 1.85 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.84 2009/02/18 13:36:11 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.85 2010/06/24 13:03:11 hannken Exp $");
#include "opt_ddb.h"
#include "opt_revcache.h"
@ -396,7 +396,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
if (vp == dvp) { /* lookup on "." */
error = 0;
} else if (cnp->cn_flags & ISDOTDOT) {
VOP_UNLOCK(dvp, 0);
VOP_UNLOCK(dvp);
error = vn_lock(vp, LK_EXCLUSIVE);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_getcwd.c,v 1.44 2010/01/08 11:35:10 pooka Exp $ */
/* $NetBSD: vfs_getcwd.c,v 1.45 2010/06/24 13:03:11 hannken Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_getcwd.c,v 1.44 2010/01/08 11:35:10 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_getcwd.c,v 1.45 2010/06/24 13:03:11 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -306,7 +306,7 @@ getcwd_getcache(struct vnode **lvpp, struct vnode **uvpp, char **bpp,
* before we take the parent lock.
*/
VOP_UNLOCK(lvp, 0);
VOP_UNLOCK(lvp);
error = vget(uvp, LK_EXCLUSIVE | LK_RETRY);
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_lookup.c,v 1.121 2010/01/08 11:35:10 pooka Exp $ */
/* $NetBSD: vfs_lookup.c,v 1.122 2010/06/24 13:03:11 hannken Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.121 2010/01/08 11:35:10 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.122 2010/06/24 13:03:11 hannken Exp $");
#include "opt_magiclinks.h"
@ -861,7 +861,7 @@ lookup_once(struct namei_state *state)
if (ndp->ni_rootdir != rootvnode) {
int retval;
VOP_UNLOCK(state->dp, 0);
VOP_UNLOCK(state->dp);
retval = vn_isunder(state->dp, ndp->ni_rootdir, l);
vn_lock(state->dp, LK_EXCLUSIVE | LK_RETRY);
if (!retval) {
@ -988,7 +988,7 @@ unionlookup:
return error;
}
KASSERT(ndp->ni_dvp != state->dp);
VOP_UNLOCK(ndp->ni_dvp, 0);
VOP_UNLOCK(ndp->ni_dvp);
vput(state->dp);
error = VFS_ROOT(mp, &tdp);
vfs_unbusy(mp, false, NULL);
@ -996,7 +996,7 @@ unionlookup:
vn_lock(ndp->ni_dvp, LK_EXCLUSIVE | LK_RETRY);
return error;
}
VOP_UNLOCK(tdp, 0);
VOP_UNLOCK(tdp);
ndp->ni_vp = state->dp = tdp;
vn_lock(ndp->ni_dvp, LK_EXCLUSIVE | LK_RETRY);
vn_lock(ndp->ni_vp, LK_EXCLUSIVE | LK_RETRY);
@ -1139,7 +1139,7 @@ terminal:
}
}
if ((cnp->cn_flags & LOCKLEAF) == 0) {
VOP_UNLOCK(state->dp, 0);
VOP_UNLOCK(state->dp);
}
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_subr.c,v 1.406 2010/06/24 07:54:47 hannken Exp $ */
/* $NetBSD: vfs_subr.c,v 1.407 2010/06/24 13:03:12 hannken Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.406 2010/06/24 07:54:47 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.407 2010/06/24 13:03:12 hannken Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@ -1352,7 +1352,7 @@ vput(vnode_t *vp)
KASSERT((vp->v_iflag & VI_MARKER) == 0);
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
vrele(vp);
}
@ -1450,7 +1450,7 @@ vrelel(vnode_t *vp, int flags)
* sleeping, don't try to inactivate it yet.
*/
if (__predict_false(vtryrele(vp))) {
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
mutex_exit(&vp->v_interlock);
return;
}
@ -1925,7 +1925,7 @@ vclean(vnode_t *vp, int flags)
* Any other processes trying to obtain this lock must first
* wait for VI_XLOCK to clear, then call the new lock operation.
*/
VOP_UNLOCK(vp, 0);
VOP_UNLOCK(vp);
}
/* Disassociate the underlying file system from the vnode. */
@ -2604,7 +2604,7 @@ done:
panic("cannot find root vnode, error=%d", error);
cwdi0.cwdi_cdir = rootvnode;
vref(cwdi0.cwdi_cdir);
VOP_UNLOCK(rootvnode, 0);
VOP_UNLOCK(rootvnode);
cwdi0.cwdi_rdir = NULL;
/*

Some files were not shown because too many files have changed in this diff Show More