diff --git a/share/man/man9/vinvalbuf.9 b/share/man/man9/vinvalbuf.9 index 260eb6f39b3..5153f14d0db 100644 --- a/share/man/man9/vinvalbuf.9 +++ b/share/man/man9/vinvalbuf.9 @@ -78,7 +78,7 @@ A 0 value is returned on success. .Bd -literal -offset indent vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = vinvalbuf(devvp, V_SAVE, cred, 0, 0); -VOP_UNLOCK(devvp, 0); +VOP_UNLOCK(devvp); if (error) return (error); .Ed diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index cbe25c07f14..b8afb1d4a5e 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -594,7 +594,7 @@ ctl_be_block_flush_file(struct ctl_be_block_lun *be_lun, vn_lock(be_lun->vn, lock_flags | LK_RETRY); error = VOP_FSYNC(be_lun->vn, beio->io_arg ? MNT_NOWAIT : MNT_WAIT, curthread); - VOP_UNLOCK(be_lun->vn, 0); + VOP_UNLOCK(be_lun->vn); vn_finished_write(mountpoint); @@ -689,7 +689,7 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun, */ error = VOP_READ(be_lun->vn, &xuio, flags, file_data->cred); - VOP_UNLOCK(be_lun->vn, 0); + VOP_UNLOCK(be_lun->vn); SDT_PROBE0(cbb, , read, file_done); if (error == 0 && xuio.uio_resid > 0) { /* @@ -736,7 +736,7 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun, * cache before returning. */ error = VOP_WRITE(be_lun->vn, &xuio, flags, file_data->cred); - VOP_UNLOCK(be_lun->vn, 0); + VOP_UNLOCK(be_lun->vn); vn_finished_write(mountpoint); SDT_PROBE0(cbb, , write, file_done); @@ -814,7 +814,7 @@ ctl_be_block_gls_file(struct ctl_be_block_lun *be_lun, off = be_lun->size_bytes; } } - VOP_UNLOCK(be_lun->vn, 0); + VOP_UNLOCK(be_lun->vn); data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; scsi_u64to8b(lbalen->lba, data->descr[0].addr); @@ -849,7 +849,7 @@ ctl_be_block_getattr_file(struct ctl_be_block_lun *be_lun, const char *attrname) val = statfs.f_bavail * statfs.f_bsize / be_lun->cbe_lun.blocksize; } - VOP_UNLOCK(be_lun->vn, 0); + VOP_UNLOCK(be_lun->vn); return (val); } @@ -2200,7 +2200,7 @@ ctl_be_block_open(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) snprintf(req->error_str, sizeof(req->error_str), "%s is not a disk or plain file", be_lun->dev_path); } - VOP_UNLOCK(be_lun->vn, 0); + VOP_UNLOCK(be_lun->vn); if (error != 0) ctl_be_block_close(be_lun); @@ -2616,7 +2616,7 @@ ctl_be_block_modify(struct ctl_be_block_softc *softc, struct ctl_lun_req *req) else if (be_lun->vn->v_type == VREG) { vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); error = ctl_be_block_open_file(be_lun, req); - VOP_UNLOCK(be_lun->vn, 0); + VOP_UNLOCK(be_lun->vn); } else error = EINVAL; if ((cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) && diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c b/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c index 52d695b4f5a..14d48da82ac 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c @@ -79,7 +79,7 @@ kobj_open_file_vnode(const char *file) return (NULL); NDFREE(&nd, NDF_ONLY_PNBUF); /* We just unlock so we hold a reference. */ - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); return (nd.ni_vp); } @@ -121,7 +121,7 @@ kobj_get_filesize_vnode(struct _buf *file, uint64_t *size) vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &va, curthread->td_ucred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error == 0) *size = (uint64_t)va.va_size; return (error); @@ -174,7 +174,7 @@ kobj_read_file_vnode(struct _buf *file, char *buf, unsigned size, unsigned off) vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_READ(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error != 0 ? -1 : size - auio.uio_resid); } diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c b/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c index bdc1e16818a..e025e10b240 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c @@ -53,7 +53,7 @@ lookupnameat(char *dirname, enum uio_seg seg, enum symfollow follow, vref(startvp); ltype = VOP_ISLOCKED(startvp); - VOP_UNLOCK(startvp, 0); + VOP_UNLOCK(startvp); NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | follow, seg, dirname, startvp, curthread); error = namei(&nd); diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c b/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c index 894675ac91a..e59a76258c7 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c @@ -154,7 +154,7 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath, vput(vp); return (error); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* * Allocate and initialize the filesystem. @@ -241,7 +241,7 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath, vfs_event_signal(NULL, VQ_MOUNT, 0); if (VFS_ROOT(mp, LK_EXCLUSIVE, &mvp)) panic("mount: lost mount"); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vfs_unbusy(mp); *vpp = mvp; return (0); diff --git a/sys/cddl/compat/opensolaris/sys/vnode.h b/sys/cddl/compat/opensolaris/sys/vnode.h index b337f96e9ae..0d164639653 100644 --- a/sys/cddl/compat/opensolaris/sys/vnode.h +++ b/sys/cddl/compat/opensolaris/sys/vnode.h @@ -185,7 +185,7 @@ vn_openat(char *pnamep, enum uio_seg seg, int filemode, int createmode, NDFREE(&nd, NDF_ONLY_PNBUF); if (error == 0) { /* We just unlock so we hold a reference. */ - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); *vpp = nd.ni_vp; } return (error); @@ -241,7 +241,7 @@ zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr) goto drop; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(vp, MNT_WAIT, curthread); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); drop: return (error); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c index 3d846c1ed47..aa80e028f7d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c @@ -139,7 +139,7 @@ vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, vattr.va_mask = AT_SIZE; vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, kcred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error) { (void) VOP_CLOSE(vp, spa_mode(vd->vdev_spa), 1, 0, kcred, NULL); vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c index 381dd75f2d0..a5cf447330e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c @@ -721,7 +721,7 @@ zfsctl_root_vptocnp(struct vop_vptocnp_args *ap) if (error != 0) return (SET_ERROR(error)); - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); *ap->a_vpp = dvp; *ap->a_buflen -= sizeof (dotzfs_name); bcopy(dotzfs_name, ap->a_buf + *ap->a_buflen, sizeof (dotzfs_name)); @@ -1230,7 +1230,7 @@ zfsctl_snapshot_vptocnp(struct vop_vptocnp_args *ap) /* Look up .zfs/snapshot, our parent. */ error = zfsctl_snapdir_vnode(vp->v_mount, NULL, LK_SHARED, &dvp); if (error == 0) { - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); *ap->a_vpp = dvp; *ap->a_buflen -= len; bcopy(node->sn_name, ap->a_buf + *ap->a_buflen, len); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c index 775697867f6..6139965ec44 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c @@ -923,7 +923,7 @@ zfs_get_xattrdir(znode_t *zp, vnode_t **xvpp, cred_t *cr, int flags) goto top; } if (error == 0) - VOP_UNLOCK(*xvpp, 0); + VOP_UNLOCK(*xvpp); return (error); } diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c index 9bf7643258c..8955961ea10 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c @@ -547,7 +547,7 @@ zfs_replay_create(void *arg1, void *arg2, boolean_t byteswap) default: error = SET_ERROR(ENOTSUP); } - VOP_UNLOCK(ZTOV(dzp), 0); + VOP_UNLOCK(ZTOV(dzp)); out: if (error == 0 && vp != NULL) @@ -591,7 +591,7 @@ zfs_replay_remove(void *arg1, void *arg2, 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; } @@ -606,7 +606,7 @@ zfs_replay_remove(void *arg1, void *arg2, boolean_t byteswap) error = SET_ERROR(ENOTSUP); } vput(vp); - VOP_UNLOCK(ZTOV(dzp), 0); + VOP_UNLOCK(ZTOV(dzp)); fail: VN_RELE(ZTOV(dzp)); @@ -647,8 +647,8 @@ zfs_replay_link(void *arg1, void *arg2, 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)); @@ -694,10 +694,10 @@ zfs_replay_rename(void *arg1, void *arg2, boolean_t byteswap) scn.cn_thread = td; 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); @@ -711,7 +711,7 @@ zfs_replay_rename(void *arg1, void *arg2, boolean_t byteswap) if (error == EJUSTRETURN) tvp = NULL; else if (error != 0) { - VOP_UNLOCK(ZTOV(tdzp), 0); + VOP_UNLOCK(ZTOV(tdzp)); goto fail; } @@ -926,7 +926,7 @@ zfs_replay_setattr(void *arg1, void *arg2, 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; @@ -967,7 +967,7 @@ zfs_replay_acl_v0(void *arg1, void *arg2, boolean_t byteswap) vp = ZTOV(zp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = zfs_setsecattr(vp, &vsa, 0, kcred, NULL); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); VN_RELE(vp); @@ -1031,7 +1031,7 @@ zfs_replay_acl(void *arg1, void *arg2, boolean_t byteswap) vp = ZTOV(zp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = zfs_setsecattr(vp, &vsa, 0, kcred, NULL); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (zfsvfs->z_fuid_replay) zfs_fuid_info_free(zfsvfs->z_fuid_replay); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c index c914db8d10c..d12a70d7433 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c @@ -305,7 +305,7 @@ zfs_sa_upgrade(sa_handle_t *hdl, dmu_tx_t *tx) zp->z_is_sa = B_TRUE; done: - VOP_UNLOCK(ZTOV(zp), 0); + VOP_UNLOCK(ZTOV(zp)); } void diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c index e597c411494..ae40f9142b6 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c @@ -1860,16 +1860,16 @@ zfs_mount(vfs_t *vfsp) vn_lock(mvp, LK_SHARED | LK_RETRY); if (VOP_GETATTR(mvp, &vattr, cr)) { - VOP_UNLOCK(mvp, 0); + VOP_UNLOCK(mvp); goto out; } if (secpolicy_vnode_owner(mvp, cr, vattr.va_uid) != 0 && VOP_ACCESS(mvp, VWRITE, cr, td) != 0) { - VOP_UNLOCK(mvp, 0); + VOP_UNLOCK(mvp); goto out; } - VOP_UNLOCK(mvp, 0); + VOP_UNLOCK(mvp); } secpolicy_fs_mount_clearopts(cr, vfsp); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 28c8df10952..dc20b52c652 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -1618,7 +1618,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp, ZFS_EXIT(zfsvfs); ltype = VOP_ISLOCKED(dvp); - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); error = zfsctl_root(zfsvfs->z_parent, LK_SHARED, &zfsctl_vp); if (error == 0) { @@ -3504,9 +3504,9 @@ zfs_rename_relock(struct vnode *sdvp, struct vnode **svpp, const char *tnm = tcnp->cn_nameptr; int error; - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); if (*tvpp != NULL && *tvpp != tdvp) - VOP_UNLOCK(*tvpp, 0); + VOP_UNLOCK(*tvpp); relock: error = vn_lock(sdvp, LK_EXCLUSIVE); @@ -3516,13 +3516,13 @@ zfs_rename_relock(struct vnode *sdvp, struct vnode **svpp, error = vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT); if (error != 0) { - VOP_UNLOCK(sdvp, 0); + VOP_UNLOCK(sdvp); if (error != EBUSY) goto out; error = vn_lock(tdvp, LK_EXCLUSIVE); if (error) goto out; - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); goto relock; } tdzp = VTOZ(tdvp); @@ -3548,8 +3548,8 @@ zfs_rename_relock(struct vnode *sdvp, struct vnode **svpp, */ if (tdzp->z_sa_hdl == NULL || sdzp->z_sa_hdl == NULL) { ZFS_EXIT(zfsvfs); - VOP_UNLOCK(sdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(sdvp); + VOP_UNLOCK(tdvp); error = SET_ERROR(EIO); goto out; } @@ -3562,8 +3562,8 @@ zfs_rename_relock(struct vnode *sdvp, struct vnode **svpp, if (error != 0) { /* Source entry invalid or not there. */ ZFS_EXIT(zfsvfs); - VOP_UNLOCK(sdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(sdvp); + VOP_UNLOCK(tdvp); if ((scnp->cn_flags & ISDOTDOT) != 0 || (scnp->cn_namelen == 1 && scnp->cn_nameptr[0] == '.')) error = SET_ERROR(EINVAL); @@ -3577,8 +3577,8 @@ zfs_rename_relock(struct vnode *sdvp, struct vnode **svpp, error = zfs_dirent_lookup(tdzp, tnm, &tzp, 0); if (error != 0) { ZFS_EXIT(zfsvfs); - VOP_UNLOCK(sdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(sdvp); + VOP_UNLOCK(tdvp); vrele(svp); if ((tcnp->cn_flags & ISDOTDOT) != 0) error = SET_ERROR(EINVAL); @@ -3601,8 +3601,8 @@ zfs_rename_relock(struct vnode *sdvp, struct vnode **svpp, nvp = svp; error = vn_lock(nvp, LK_EXCLUSIVE | LK_NOWAIT); if (error != 0) { - VOP_UNLOCK(sdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(sdvp); + VOP_UNLOCK(tdvp); if (tvp != NULL) vrele(tvp); if (error != EBUSY) { @@ -3614,7 +3614,7 @@ zfs_rename_relock(struct vnode *sdvp, struct vnode **svpp, vrele(nvp); goto out; } - VOP_UNLOCK(nvp, 0); + VOP_UNLOCK(nvp); /* * Concurrent rename race. * XXX ? @@ -3638,9 +3638,9 @@ zfs_rename_relock(struct vnode *sdvp, struct vnode **svpp, nvp = tvp; error = vn_lock(nvp, LK_EXCLUSIVE | LK_NOWAIT); if (error != 0) { - VOP_UNLOCK(sdvp, 0); - VOP_UNLOCK(tdvp, 0); - VOP_UNLOCK(*svpp, 0); + VOP_UNLOCK(sdvp); + VOP_UNLOCK(tdvp); + VOP_UNLOCK(*svpp); if (error != EBUSY) { vrele(nvp); goto out; @@ -3962,17 +3962,17 @@ zfs_rename(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp, unlockout: /* all 4 vnodes are locked, ZFS_ENTER called */ ZFS_EXIT(zfsvfs); - VOP_UNLOCK(*svpp, 0); - VOP_UNLOCK(sdvp, 0); + VOP_UNLOCK(*svpp); + VOP_UNLOCK(sdvp); out: /* original two vnodes are locked */ if (error == 0 && zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zilog, 0); if (*tvpp != NULL) - VOP_UNLOCK(*tvpp, 0); + VOP_UNLOCK(*tvpp); if (tdvp != *tvpp) - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); return (error); } @@ -5557,7 +5557,7 @@ vop_getextattr { } else if (ap->a_uio != NULL) error = VOP_READ(vp, ap->a_uio, IO_UNIT, ap->a_cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_close(vp, flags, ap->a_cred, td); ZFS_EXIT(zfsvfs); @@ -5691,7 +5691,7 @@ vop_setextattr { if (error == 0) VOP_WRITE(vp, ap->a_uio, IO_UNIT, ap->a_cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_close(vp, flags, ap->a_cred, td); ZFS_EXIT(zfsvfs); @@ -5953,7 +5953,7 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) covered_vp = vp->v_mount->mnt_vnodecovered; vhold(covered_vp); ltype = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = vget(covered_vp, LK_SHARED | LK_VNHELD, curthread); if (error == 0) { error = VOP_VPTOCNP(covered_vp, ap->a_vpp, ap->a_cred, diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c index c94cef7d456..c18601569b2 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c @@ -1245,7 +1245,7 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_num, znode_t **zpp) err = insmntque(vp, zfsvfs->z_vfs); if (err == 0) { vp->v_hash = obj_num; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else { zp->z_vnode = NULL; zfs_znode_dmu_fini(zp); diff --git a/sys/compat/cloudabi/cloudabi_file.c b/sys/compat/cloudabi/cloudabi_file.c index 0b5231bb885..6b9225b9341 100644 --- a/sys/compat/cloudabi/cloudabi_file.c +++ b/sys/compat/cloudabi/cloudabi_file.c @@ -291,7 +291,7 @@ cloudabi_sys_file_open(struct thread *td, finit(fp, (fflags & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE, vp, &vnops); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* Truncate file. */ if (fflags & O_TRUNC) { @@ -434,14 +434,14 @@ cloudabi_sys_file_readdir(struct thread *td, /* Validate file type. */ vn_lock(vp, LK_SHARED | LK_RETRY); if (vp->v_type != VDIR) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = ENOTDIR; goto done; } #ifdef MAC error = mac_vnode_check_readdir(td->td_ucred, vp); if (error != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); goto done; } #endif /* MAC */ @@ -451,7 +451,7 @@ cloudabi_sys_file_readdir(struct thread *td, ncookies = 0; error = VOP_READDIR(vp, &readuio, fp->f_cred, &eof, &ncookies, &cookies); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error != 0) goto done; diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index ed2d0701af5..8ef12bfb8bd 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -395,7 +395,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) * Lock no longer needed */ locked = false; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* * Check if file_offset page aligned. Currently we cannot handle @@ -468,7 +468,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) cleanup: if (opened) { if (locked) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); locked = false; VOP_CLOSE(vp, FREAD, td->td_ucred, td); } @@ -480,7 +480,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) VOP_UNSET_TEXT_CHECKED(vp); } if (locked) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* Release the temporary mapping. */ if (a_out) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index e861eb79357..a4490ca689c 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1668,7 +1668,7 @@ linux_file_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, vn_lock(vp, LK_SHARED | LK_RETRY); error = vn_stat(vp, sb, td->td_ucred, NOCRED, td); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } diff --git a/sys/compat/ndis/subr_ndis.c b/sys/compat/ndis/subr_ndis.c index 914c85887e4..6d698f64f5b 100644 --- a/sys/compat/ndis/subr_ndis.c +++ b/sys/compat/ndis/subr_ndis.c @@ -2845,7 +2845,7 @@ NdisOpenFile(status, filehandle, filelength, filename, highestaddr) /* Get the file size. */ VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); fh->nf_vp = nd.ni_vp; fh->nf_map = NULL; diff --git a/sys/dev/beri/virtio/virtio_block.c b/sys/dev/beri/virtio/virtio_block.c index 7c8a03966a3..bae4d2951a1 100644 --- a/sys/dev/beri/virtio/virtio_block.c +++ b/sys/dev/beri/virtio/virtio_block.c @@ -133,12 +133,12 @@ vtblk_rdwr(struct beri_vtblk_softc *sc, struct iovec *iov, if (operation == 0) { vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_READ(vp, &auio, IO_DIRECT, sc->cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else { (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_WRITE(vp, &auio, IO_SYNC, sc->cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); } @@ -218,7 +218,7 @@ close_file(struct beri_vtblk_softc *sc, struct thread *td) if (sc->vnode != NULL) { vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY); sc->vnode->v_vflag &= ~VV_MD; - VOP_UNLOCK(sc->vnode, 0); + VOP_UNLOCK(sc->vnode); error = vn_close(sc->vnode, (FREAD|FWRITE), sc->cred, td); if (error != 0) @@ -263,7 +263,7 @@ open_file(struct beri_vtblk_softc *sc, struct thread *td) } } nd.ni_vp->v_vflag |= VV_MD; - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); sc->vnode = nd.ni_vp; sc->cred = crhold(td->td_ucred); diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index c9cd5a6e95a..da2bad13e56 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -918,7 +918,7 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(vp, MNT_WAIT, td); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); return (error); } @@ -989,13 +989,13 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) if (auio.uio_rw == UIO_READ) { vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_READ(vp, &auio, 0, sc->cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else { (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_WRITE(vp, &auio, sc->flags & MD_ASYNC ? 0 : IO_SYNC, sc->cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); if (error == 0) sc->flags &= ~MD_VERIFY; @@ -1419,7 +1419,7 @@ mdsetcred(struct md_s *sc, struct ucred *cred) auio.uio_resid = aiov.iov_len; vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY); error = VOP_READ(sc->vnode, &auio, 0, sc->cred); - VOP_UNLOCK(sc->vnode, 0); + VOP_UNLOCK(sc->vnode); free(tmpbuf, M_TEMP); } return (error); @@ -1470,7 +1470,7 @@ mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td) } } nd.ni_vp->v_vflag |= VV_MD; - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); if (mdr->md_fwsectors != 0) sc->fwsectors = mdr->md_fwsectors; @@ -1493,7 +1493,7 @@ mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td) } return (0); bad: - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); return (error); } @@ -1538,7 +1538,7 @@ mddestroy(struct md_s *sc, struct thread *td) if (sc->vnode != NULL) { vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY); sc->vnode->v_vflag &= ~VV_MD; - VOP_UNLOCK(sc->vnode, 0); + VOP_UNLOCK(sc->vnode); (void)vn_close(sc->vnode, sc->flags & MD_READONLY ? FREAD : (FREAD|FWRITE), sc->cred, td); } diff --git a/sys/dev/veriexec/verified_exec.c b/sys/dev/veriexec/verified_exec.c index ac2b7c8adab..3c72d30155d 100644 --- a/sys/dev/veriexec/verified_exec.c +++ b/sys/dev/veriexec/verified_exec.c @@ -205,7 +205,7 @@ verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, if (error != 0) { mac_veriexec_set_fingerprint_status(nid.ni_vp, FINGERPRINT_INVALID); - VOP_UNLOCK(nid.ni_vp, 0); + VOP_UNLOCK(nid.ni_vp); (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, td); return (error); @@ -227,7 +227,7 @@ verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, */ mac_veriexec_set_fingerprint_status(nid.ni_vp, FINGERPRINT_INVALID); - VOP_UNLOCK(nid.ni_vp, 0); + VOP_UNLOCK(nid.ni_vp); (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, td); if (params->flags & VERIEXEC_LABEL) labellen = strnlen(lparams->label, diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index ffbb4a25262..91deac66c1f 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -2282,7 +2282,7 @@ xbb_dispatch_file(struct xbb_softc *xbb, struct xbb_xen_reqlist *reqlist, vn_lock(xbb->vn, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(xbb->vn, MNT_WAIT, curthread); - VOP_UNLOCK(xbb->vn, 0); + VOP_UNLOCK(xbb->vn); vn_finished_write(mountpoint); @@ -2401,7 +2401,7 @@ xbb_dispatch_file(struct xbb_softc *xbb, struct xbb_xen_reqlist *reqlist, error = VOP_READ(xbb->vn, &xuio, (flags & BIO_ORDERED) ? (IO_DIRECT|IO_SYNC) : 0, file_data->cred); - VOP_UNLOCK(xbb->vn, 0); + VOP_UNLOCK(xbb->vn); break; case BIO_WRITE: { struct mount *mountpoint; @@ -2434,7 +2434,7 @@ xbb_dispatch_file(struct xbb_softc *xbb, struct xbb_xen_reqlist *reqlist, */ error = VOP_WRITE(xbb->vn, &xuio, (flags & BIO_ORDERED) ? IO_SYNC : 0, file_data->cred); - VOP_UNLOCK(xbb->vn, 0); + VOP_UNLOCK(xbb->vn); vn_finished_write(mountpoint); @@ -2744,7 +2744,7 @@ xbb_open_backend(struct xbb_softc *xbb) xenbus_dev_fatal(xbb->dev, error, "%s is not a disk " "or file", xbb->dev_name); } - VOP_UNLOCK(xbb->vn, 0); + VOP_UNLOCK(xbb->vn); if (error != 0) { xbb_close_backend(xbb); diff --git a/sys/fs/autofs/autofs_vnops.c b/sys/fs/autofs/autofs_vnops.c index 09d77b9fccf..648daa8aa36 100644 --- a/sys/fs/autofs/autofs_vnops.c +++ b/sys/fs/autofs/autofs_vnops.c @@ -152,7 +152,7 @@ autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, */ lock_flags = VOP_ISLOCKED(vp); vref(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); sx_xlock(&autofs_softc->sc_lock); diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index d1fbd010066..04c54581865 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -235,7 +235,7 @@ iso_mountfs(devvp, mp) if (error == 0) g_getattr("MNT::verified", cp, &isverified); g_topology_unlock(); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); if (error) goto out; if (devvp->v_rdev->si_iosize_max != 0) diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 27a186964a8..ac73d2ad4d1 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -261,11 +261,11 @@ cd9660_ioctl(ap) vp = ap->a_vp; vn_lock(vp, LK_SHARED | LK_RETRY); if (vp->v_iflag & VI_DOOMED) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (EBADF); } if (vp->v_type == VCHR || vp->v_type == VBLK) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (EOPNOTSUPP); } @@ -281,7 +281,7 @@ cd9660_ioctl(ap) break; } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index 984ff274844..a7c42ef5625 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -404,7 +404,7 @@ devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int flags) VI_UNLOCK(vp); vgone(vp); if ((flags & DEVFS_DEL_VNLOCKED) == 0) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); sx_xlock(&dm->dm_lock); } else diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index c093cfb4c15..4b74d7fa275 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -155,7 +155,7 @@ devfs_mount(struct mount *mp) sx_xunlock(&fmp->dm_lock); } - VOP_UNLOCK(rvp, 0); + VOP_UNLOCK(rvp); vfs_mountedfrom(mp, "devfs"); diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 590334f1615..ccda7d0fc69 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -241,7 +241,7 @@ devfs_populate_vp(struct vnode *vp) DEVFS_DMP_HOLD(dmp); /* Can't call devfs_populate() with the vnode lock held. */ - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); devfs_populate(dmp); sx_xunlock(&dmp->dm_lock); @@ -646,7 +646,7 @@ devfs_close(struct vop_close_args *ap) vholdl(vp); VI_UNLOCK(vp); vp_locked = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); KASSERT(dev->si_refcount > 0, ("devfs_close() on un-referenced struct cdev *(%s)", devtoname(dev))); error = dsw->d_close(dev, ap->a_fflag | dflags, S_IFCHR, td); @@ -969,7 +969,7 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock) if (de == NULL) return (ENOENT); dvplocked = VOP_ISLOCKED(dvp); - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); error = devfs_allocv(de, mp, cnp->cn_lkflags & LK_TYPE_MASK, vpp); *dm_unlock = 0; @@ -1158,7 +1158,7 @@ devfs_open(struct vop_open_args *ap) } vlocked = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); fpop = td->td_fpop; td->td_fpop = fp; @@ -1480,9 +1480,9 @@ devfs_remove(struct vop_remove_args *ap) de_covered->de_flags &= ~DE_COVERED; } /* We need to unlock dvp because devfs_delete() may lock it. */ - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (dvp != vp) - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); devfs_delete(dmp, de, 0); sx_xunlock(&dmp->dm_lock); if (dvp != vp) @@ -1523,7 +1523,7 @@ devfs_revoke(struct vop_revoke_args *ap) vgone(vp); vdrop(vp); - VOP_UNLOCK(vp,0); + VOP_UNLOCK(vp); loop: for (;;) { mtx_lock(&devfs_de_interlock); @@ -1579,12 +1579,12 @@ devfs_rioctl(struct vop_ioctl_args *ap) vp = ap->a_vp; vn_lock(vp, LK_SHARED | LK_RETRY); if (vp->v_iflag & VI_DOOMED) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (EBADF); } dmp = VFSTODEVFS(vp->v_mount); sx_xlock(&dmp->dm_lock); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); DEVFS_DMP_HOLD(dmp); devfs_populate(dmp); if (DEVFS_DMP_DROP(dmp)) { diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index 7f9c9690d8a..97d7eea3bce 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -197,10 +197,10 @@ ext2_mount(struct mount *mp) if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); if (error) { - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); return (error); } - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); g_topology_lock(); error = g_access(ump->um_cp, 0, 1, 0); g_topology_unlock(); @@ -745,7 +745,7 @@ ext2_reload(struct mount *mp, struct thread *td) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); if (vinvalbuf(devvp, 0, 0, 0) != 0) panic("ext2_reload: dirty1"); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); /* * Step 2: re-read superblock from disk. @@ -803,7 +803,7 @@ ext2_reload(struct mount *mp, struct thread *td) error = bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)), (int)fs->e2fs_bsize, NOCRED, &bp); if (error) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vrele(vp); MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); return (error); @@ -813,7 +813,7 @@ ext2_reload(struct mount *mp, struct thread *td) EXT2_INODE_SIZE(fs) * ino_to_fsbo(fs, ip->i_number)), ip); brelse(bp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vrele(vp); if (error) { @@ -850,7 +850,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp) g_topology_lock(); error = g_vfs_open(devvp, &cp, "ext2fs", ronly ? 0 : 1); g_topology_unlock(); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); if (error) return (error); @@ -1156,7 +1156,7 @@ ext2_sync(struct mount *mp, int waitfor) } if ((error = VOP_FSYNC(vp, waitfor, td)) != 0) allerror = error; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vrele(vp); } @@ -1167,7 +1167,7 @@ ext2_sync(struct mount *mp, int waitfor) vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); if ((error = VOP_FSYNC(ump->um_devvp, waitfor, td)) != 0) allerror = error; - VOP_UNLOCK(ump->um_devvp, 0); + VOP_UNLOCK(ump->um_devvp); } /* diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 95ba836b7a0..7ac5d5e65c0 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -835,13 +835,13 @@ ext2_rename(struct vop_rename_args *ap) ip = VTOI(fvp); if (ip->i_nlink >= EXT4_LINK_MAX && !EXT2_HAS_RO_COMPAT_FEATURE(ip->i_e2fs, EXT2F_ROCOMPAT_DIR_NLINK)) { - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); error = EMLINK; goto abortit; } if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || (dp->i_flags & APPEND)) { - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); error = EPERM; goto abortit; } @@ -852,7 +852,7 @@ ext2_rename(struct vop_rename_args *ap) if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') || dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT || (ip->i_flag & IN_RENAME)) { - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); error = EINVAL; goto abortit; } @@ -880,7 +880,7 @@ ext2_rename(struct vop_rename_args *ap) ext2_inc_nlink(ip); ip->i_flag |= IN_CHANGE; if ((error = ext2_update(fvp, !DOINGASYNC(fvp))) != 0) { - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); goto bad; } @@ -895,7 +895,7 @@ ext2_rename(struct vop_rename_args *ap) * call to checkpath(). */ error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); if (oldparent != dp->i_number) newparent = dp->i_number; if (doingdirectory && newparent) { @@ -1492,7 +1492,7 @@ ext2_rmdir(struct vop_rmdir_args *ap) ext2_dec_nlink(dp); dp->i_flag |= IN_CHANGE; cache_purge(dvp); - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); /* * Truncate inode. The only stuff left * in the directory is "." and "..". @@ -1502,7 +1502,7 @@ ext2_rmdir(struct vop_rmdir_args *ap) cnp->cn_thread); cache_purge(ITOV(ip)); if (vn_lock(dvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); } diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 6737bfb94f5..e6aa9b9a234 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -110,7 +110,7 @@ fdesc_mount(struct mount *mp) rvp->v_type = VDIR; rvp->v_vflag |= VV_ROOT; fmp->f_root = rvp; - VOP_UNLOCK(rvp, 0); + VOP_UNLOCK(rvp); /* XXX -- don't mark as local to work around fts() problems */ /*mp->mnt_flag |= MNT_LOCAL;*/ vfs_getnewfsid(mp); diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 127bdccd8c4..6fc6e73a1e2 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -340,7 +340,7 @@ fdesc_lookup(struct vop_lookup_args *ap) * will be re-acquired. */ vhold(dvp); - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); fdrop(fp, td); /* Re-aquire the lock afterwards. */ @@ -417,7 +417,7 @@ fdesc_pathconf(struct vop_pathconf_args *ap) if (VTOFDESC(vp)->fd_type == Froot) return (vop_stdpathconf(ap)); vref(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = kern_fpathconf(curthread, VTOFDESC(vp)->fd_fd, ap->a_name, ap->a_retval); vn_lock(vp, LK_SHARED | LK_RETRY); @@ -515,7 +515,7 @@ fdesc_setattr(struct vop_setattr_args *ap) if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) == 0) { vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_SETATTR(vp, ap->a_vap, ap->a_cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); } fdrop(fp, td); @@ -629,7 +629,7 @@ fdesc_readlink(struct vop_readlink_args *va) panic("fdesc_readlink: not fdescfs link"); fd_fd = ((struct fdescnode *)vn->v_data)->fd_fd; lockflags = VOP_ISLOCKED(vn); - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); td = curthread; error = fget_cap(td, fd_fd, &cap_no_rights, &fp, NULL); diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index b4fefbde79a..c59fed48f4e 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -194,7 +194,7 @@ fifo_open(ap) if ((ap->a_mode & O_NONBLOCK) == 0) { if ((ap->a_mode & FREAD) && fip->fi_writers == 0) { gen = fip->fi_wgen; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); stops_deferred = sigdeferstop(SIGDEFERSTOP_OFF); error = msleep(&fip->fi_readers, PIPE_MTX(fpipe), PDROP | PCATCH | PSOCK, "fifoor", 0); @@ -221,7 +221,7 @@ fifo_open(ap) } if ((ap->a_mode & FWRITE) && fip->fi_readers == 0) { gen = fip->fi_rgen; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); stops_deferred = sigdeferstop(SIGDEFERSTOP_OFF); error = msleep(&fip->fi_writers, PIPE_MTX(fpipe), PDROP | PCATCH | PSOCK, "fifoow", 0); diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index fff2cca67e7..a4c21c5c5a4 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -626,7 +626,7 @@ fuse_vfsop_root(struct mount *mp, int lkflags, struct vnode **vpp) SDT_PROBE2(fusefs, , vfsops, trace, 1, "root vnode race"); FUSE_UNLOCK(); - VOP_UNLOCK(*vpp, 0); + VOP_UNLOCK(*vpp); vrele(*vpp); vrecycle(*vpp); *vpp = data->vroot; diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 7538fef7f43..19d4186bd9e 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -301,10 +301,10 @@ msdosfs_mount(struct mount *mp) if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); if (error) { - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); return (error); } - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); g_topology_lock(); error = g_access(pmp->pm_cp, 0, 1, 0); g_topology_unlock(); @@ -406,7 +406,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp) dev = devvp->v_rdev; if (atomic_cmpset_acq_ptr((uintptr_t *)&dev->si_mountpt, 0, (uintptr_t)mp) == 0) { - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); return (EBUSY); } g_topology_lock(); @@ -414,12 +414,12 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp) g_topology_unlock(); if (error != 0) { atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); return (error); } dev_ref(dev); bo = &devvp->v_bufobj; - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); if (dev->si_iosize_max != 0) mp->mnt_iosize_max = dev->si_iosize_max; if (mp->mnt_iosize_max > MAXPHYS) @@ -926,7 +926,7 @@ msdosfs_sync(struct mount *mp, int waitfor) error = VOP_FSYNC(vp, waitfor, td); if (error) allerror = error; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vrele(vp); } @@ -938,7 +938,7 @@ msdosfs_sync(struct mount *mp, int waitfor) error = VOP_FSYNC(pmp->pm_devvp, waitfor, td); if (error) allerror = error; - VOP_UNLOCK(pmp->pm_devvp, 0); + VOP_UNLOCK(pmp->pm_devvp); } error = msdosfs_fsiflush(pmp, waitfor); diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 0aaf4bddb80..fe5015b2ad9 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -853,7 +853,7 @@ msdosfs_fsync(struct vop_fsync_args *ap) devvp = VTODE(ap->a_vp)->de_pmp->pm_devvp; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); allerror = VOP_FSYNC(devvp, MNT_WAIT, ap->a_td); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); } else allerror = 0; @@ -1010,7 +1010,7 @@ msdosfs_rename(struct vop_rename_args *ap) (fcnp->cn_flags & ISDOTDOT) || (tcnp->cn_flags & ISDOTDOT) || (ip->de_flag & DE_RENAME)) { - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); error = EINVAL; goto abortit; } @@ -1041,7 +1041,7 @@ msdosfs_rename(struct vop_rename_args *ap) * call to doscheckpath(). */ error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); if (VTODE(fdvp)->de_StartCluster != VTODE(tdvp)->de_StartCluster) newparent = 1; if (doingdirectory && newparent) { @@ -1110,7 +1110,7 @@ msdosfs_rename(struct vop_rename_args *ap) if ((fcnp->cn_flags & SAVESTART) == 0) panic("msdosfs_rename: lost from startdir"); if (!newparent) - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); if (relookup(fdvp, &fvp, fcnp) == 0) vrele(fdvp); if (fvp == NULL) { @@ -1120,7 +1120,7 @@ msdosfs_rename(struct vop_rename_args *ap) if (doingdirectory) panic("rename: lost dir entry"); if (newparent) - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); vrele(tdvp); vrele(ap->a_fvp); return 0; @@ -1140,9 +1140,9 @@ msdosfs_rename(struct vop_rename_args *ap) if (xp != ip) { if (doingdirectory) panic("rename: lost dir entry"); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); if (newparent) - VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fdvp); vrele(ap->a_fvp); xp = NULL; } else { @@ -1165,8 +1165,8 @@ msdosfs_rename(struct vop_rename_args *ap) if (error) { memcpy(ip->de_Name, oldname, 11); if (newparent) - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(fvp); goto bad; } /* @@ -1186,8 +1186,8 @@ msdosfs_rename(struct vop_rename_args *ap) if (error) { /* XXX should downgrade to ro here, fs is corrupt */ if (newparent) - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(fvp); goto bad; } if (!doingdirectory) { @@ -1196,8 +1196,8 @@ msdosfs_rename(struct vop_rename_args *ap) if (error) { /* XXX should downgrade to ro here, fs is corrupt */ if (newparent) - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(fvp); goto bad; } if (ip->de_dirclust == MSDOSFSROOT) @@ -1207,7 +1207,7 @@ msdosfs_rename(struct vop_rename_args *ap) } reinsert(ip); if (newparent) - VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fdvp); } /* @@ -1226,7 +1226,7 @@ msdosfs_rename(struct vop_rename_args *ap) if (error) { /* XXX should downgrade to ro here, fs is corrupt */ brelse(bp); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); goto bad; } dotdotp = (struct direntry *)bp->b_data + 1; @@ -1240,7 +1240,7 @@ msdosfs_rename(struct vop_rename_args *ap) bdwrite(bp); else if ((error = bwrite(bp)) != 0) { /* XXX should downgrade to ro here, fs is corrupt */ - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); goto bad; } } @@ -1253,7 +1253,7 @@ msdosfs_rename(struct vop_rename_args *ap) * namecache entries that were installed for this direntry. */ cache_purge(fvp); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fvp); bad: if (xp) vput(tvp); diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index a7a0aea62db..bc88b118213 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -2508,7 +2508,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, if (error == 0) error = VOP_GETACL(vp, ACL_TYPE_NFS4, naclp, cred, p); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } else error = NFSERR_PERM; if (error != 0) { diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index 62f3f4b925d..215795b2be2 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -992,7 +992,7 @@ void nfsd_mntinit(void); * later, for debugging or stats, etc. */ #define NFSVOPLOCK(v, f) vn_lock((v), (f)) -#define NFSVOPUNLOCK(v, f) VOP_UNLOCK((v), (f)) +#define NFSVOPUNLOCK(v) VOP_UNLOCK((v)) #define NFSVOPISLOCKED(v) VOP_ISLOCKED((v)) /* diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index 471e029a8b5..faf01b54644 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -334,7 +334,7 @@ nfscl_ngetreopen(struct mount *mntp, u_int8_t *fhp, int fhsize, error = vfs_hash_get(mntp, hash, (LK_EXCLUSIVE | LK_NOWAIT), td, &nvp, newnfs_vncmpf, nfhp); if (error == 0 && nvp != NULL) { - NFSVOPUNLOCK(nvp, 0); + NFSVOPUNLOCK(nvp); } else if (error == EBUSY) { /* * It is safe so long as a vflush() with diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index d3587e89c55..eb5d252b36b 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -1625,7 +1625,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, /* * Lose the lock but keep the ref. */ - NFSVOPUNLOCK(*vpp, 0); + NFSVOPUNLOCK(*vpp); return (0); } error = EIO; @@ -1826,7 +1826,7 @@ nfs_sync(struct mount *mp, int waitfor) error = VOP_FSYNC(vp, waitfor, td); if (error) allerror = error; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); vrele(vp); } return (allerror); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 38b1c3b5928..53f6f4bbc4b 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1262,7 +1262,7 @@ nfs_lookup(struct vop_lookup_args *ap) error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { vfs_ref(mp); - NFSVOPUNLOCK(dvp, 0); + NFSVOPUNLOCK(dvp); error = vfs_busy(mp, 0); NFSVOPLOCK(dvp, ltype | LK_RETRY); vfs_rel(mp); @@ -1273,7 +1273,7 @@ nfs_lookup(struct vop_lookup_args *ap) if (error != 0) return (error); } - NFSVOPUNLOCK(dvp, 0); + NFSVOPUNLOCK(dvp); error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL, cnp->cn_lkflags); if (error == 0) @@ -1839,7 +1839,7 @@ nfs_rename(struct vop_rename_args *ap) * this condition can result in potential (silent) data loss. */ error = VOP_FSYNC(fvp, MNT_WAIT, fcnp->cn_thread); - NFSVOPUNLOCK(fvp, 0); + NFSVOPUNLOCK(fvp); if (!error && tvp) error = VOP_FSYNC(tvp, MNT_WAIT, tcnp->cn_thread); if (error) @@ -3090,7 +3090,7 @@ nfs_advlock(struct vop_advlock_args *ap) ap->a_fl, 0, cred, td, ap->a_id, ap->a_flags); if (ret == NFSERR_DENIED && (ap->a_flags & F_WAIT) && ap->a_op == F_SETLK) { - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); error = nfs_catnap(PZERO | PCATCH, ret, "ncladvl"); if (error) @@ -3144,13 +3144,13 @@ nfs_advlock(struct vop_advlock_args *ap) } else if (!NFS_ISV4(vp)) { if ((VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) { size = VTONFS(vp)->n_size; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); error = lf_advlock(ap, &(vp->v_lockf), size); } else { if (nfs_advlock_p != NULL) error = nfs_advlock_p(ap); else { - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); error = ENOLCK; } } @@ -3161,14 +3161,14 @@ nfs_advlock(struct vop_advlock_args *ap) mtx_lock(&np->n_mtx); np->n_flag |= NHASBEENLOCKED; mtx_unlock(&np->n_mtx); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } } return (error); } else error = EOPNOTSUPP; out: - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); return (error); } @@ -3189,10 +3189,10 @@ nfs_advlockasync(struct vop_advlockasync_args *ap) return (error); if ((VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) { size = VTONFS(vp)->n_size; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); error = lf_advlockasync(ap, &(vp->v_lockf), size); } else { - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); error = EOPNOTSUPP; } return (error); diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index bb21711f1a4..8809563a1a3 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -301,7 +301,7 @@ nfsvno_getattr(struct vnode *vp, struct nfsvattr *nvap, error = VOP_GETATTR(vp, &nvap->na_vattr, nd->nd_cred); if (lockedit != 0) - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); /* * If we got the Change, Size and Modify Time from the DS, @@ -388,7 +388,7 @@ nfsvno_accchk(struct vnode *vp, accmode_t accmode, struct ucred *cred, } if (error != 0) { if (vpislocked == 0) - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); goto out; } @@ -428,7 +428,7 @@ nfsvno_accchk(struct vnode *vp, accmode_t accmode, struct ucred *cred, } } if (vpislocked == 0) - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); out: NFSEXITCODE(error); @@ -517,7 +517,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, goto out1; } if (islocked) - NFSVOPUNLOCK(dp, 0); + NFSVOPUNLOCK(dp); VREF(dp); *retdirp = dp; if (NFSVNO_EXRDONLY(exp)) @@ -585,7 +585,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) nfsvno_relpathbuf(ndp); if (ndp->ni_vp && !lockleaf) - NFSVOPUNLOCK(ndp->ni_vp, 0); + NFSVOPUNLOCK(ndp->ni_vp); break; } @@ -593,7 +593,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, * Validate symlink */ if ((cnp->cn_flags & LOCKPARENT) && ndp->ni_pathlen == 1) - NFSVOPUNLOCK(ndp->ni_dvp, 0); + NFSVOPUNLOCK(ndp->ni_dvp); if (!(nd->nd_flag & ND_PUBLOOKUP)) { error = EINVAL; goto badlink2; @@ -1377,7 +1377,7 @@ nfsvno_rename(struct nameidata *fromndp, struct nameidata *tondp, if (ndflag & ND_NFSV4) { if (NFSVOPLOCK(fvp, LK_EXCLUSIVE) == 0) { error = nfsrv_checkremove(fvp, 0, p); - NFSVOPUNLOCK(fvp, 0); + NFSVOPUNLOCK(fvp); } else error = EPERM; if (tvp && !error) @@ -1462,7 +1462,7 @@ nfsvno_link(struct nameidata *ndp, struct vnode *vp, struct ucred *cred, vrele(ndp->ni_dvp); else vput(ndp->ni_dvp); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } else { if (ndp->ni_dvp == ndp->ni_vp) vrele(ndp->ni_dvp); @@ -2263,7 +2263,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, */ mp = vp->v_mount; vfs_ref(mp); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); nd->nd_repstat = vfs_busy(mp, 0); vfs_rel(mp); if (nd->nd_repstat != 0) { @@ -2397,8 +2397,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, r = VOP_LOOKUP(vp, &nvp, &cn); if (vp != nvp) - NFSVOPUNLOCK(vp, - 0); + NFSVOPUNLOCK(vp); } } @@ -2512,7 +2511,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, if (nvp != NULL) { supports_nfsv4acls = nfs_supportsnfsv4acls(nvp); - NFSVOPUNLOCK(nvp, 0); + NFSVOPUNLOCK(nvp); } else supports_nfsv4acls = 0; if (refp != NULL) { @@ -3571,7 +3570,7 @@ nfssvc_nfsd(struct thread *td, struct nfssvc_args *uap) if (ret == 0) { nfsrv_dsremove(curdvp, fname, td->td_ucred, td); - NFSVOPUNLOCK(curdvp, 0); + NFSVOPUNLOCK(curdvp); } } NFSD_DEBUG(4, "nfsrv_copymr=%d\n", error); @@ -3847,7 +3846,7 @@ nfsrv_dscreate(struct vnode *dvp, struct vattr *vap, struct vattr *nvap, error = NFSVOPLOCK(dvp, LK_EXCLUSIVE); if (error == 0) { error = VOP_CREATE(dvp, &nvp, &named.ni_cnd, vap); - NFSVOPUNLOCK(dvp, 0); + NFSVOPUNLOCK(dvp); if (error == 0) { /* Set the ownership of the file. */ error = VOP_SETATTR(nvp, nvap, tcred); @@ -4234,7 +4233,7 @@ nfsrv_dsremove(struct vnode *dvp, char *fname, struct ucred *tcred, error = VOP_REMOVE(dvp, nvp, &named.ni_cnd); vput(nvp); } - NFSVOPUNLOCK(dvp, 0); + NFSVOPUNLOCK(dvp); nfsvno_relpathbuf(&named); if (error != 0) printf("pNFS: nfsrv_pnfsremove failed=%d\n", error); @@ -4555,7 +4554,7 @@ nfsrv_proxyds(struct nfsrv_descript *nd, struct vnode *vp, off_t off, int cnt, NFSUNLOCKMNT(failnmp); } for (i = 0; i < mirrorcnt; i++) - NFSVOPUNLOCK(dvp[i], 0); + NFSVOPUNLOCK(dvp[i]); NFSD_DEBUG(4, "nfsrv_proxyds: aft RPC=%d trya=%d\n", error, trycnt); /* Try the Read/Getattr again if a mirror was deleted. */ @@ -4740,7 +4739,7 @@ nfsrv_dsgetsockmnt(struct vnode *vp, int lktype, char *buf, int *buflenp, vput(nvp); } if (error != 0 || lktype == 0) - NFSVOPUNLOCK(dvp, 0); + NFSVOPUNLOCK(dvp); } } if (error == 0) { @@ -4781,7 +4780,7 @@ nfsrv_dsgetsockmnt(struct vnode *vp, int lktype, char *buf, int *buflenp, * have locked dvp's that need to be unlocked. */ for (i = 0; i < gotone; i++) { - NFSVOPUNLOCK(*dvpp, 0); + NFSVOPUNLOCK(*dvpp); *dvpp++ = NULL; } } diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 3bfe8f6444f..1f5f38987a3 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -272,7 +272,7 @@ nfsrvd_getattr(struct nfsrv_descript *nd, int isdgram, } else at_root = 0; vfs_ref(mp); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); if (at_root != 0) { if ((nd->nd_repstat = NFSVOPLOCK(tvp, LK_SHARED)) == 0) { @@ -1407,7 +1407,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, __unused int isdgram, nd->nd_repstat = nfsvno_getattr(vp, &nva, nd, p, 1, NULL); if (vpp != NULL && nd->nd_repstat == 0) { - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); *vpp = vp; } else vput(vp); @@ -1582,14 +1582,14 @@ nfsrvd_rename(struct nfsrv_descript *nd, int isdgram, tdp = todp; tnes = *toexp; if (dp != tdp) { - NFSVOPUNLOCK(dp, 0); + NFSVOPUNLOCK(dp); /* Might lock tdp. */ tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd, p, 0, NULL); } else { tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd, p, 1, NULL); - NFSVOPUNLOCK(dp, 0); + NFSVOPUNLOCK(dp); } } else { tfh.nfsrvfh_len = 0; @@ -1611,16 +1611,16 @@ nfsrvd_rename(struct nfsrv_descript *nd, int isdgram, tnes = *exp; tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd, p, 1, NULL); - NFSVOPUNLOCK(dp, 0); + NFSVOPUNLOCK(dp); } else { - NFSVOPUNLOCK(dp, 0); + NFSVOPUNLOCK(dp); nd->nd_cred->cr_uid = nd->nd_saveduid; nfsd_fhtovp(nd, &tfh, LK_EXCLUSIVE, &tdp, &tnes, NULL, 0); /* Locks tdp. */ if (tdp) { tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd, p, 1, NULL); - NFSVOPUNLOCK(tdp, 0); + NFSVOPUNLOCK(tdp); } } } @@ -1727,7 +1727,7 @@ nfsrvd_link(struct nfsrv_descript *nd, int isdgram, nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft); goto out; } - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); if (vnode_vtype(vp) == VDIR) { if (nd->nd_flag & ND_NFSV4) nd->nd_repstat = NFSERR_ISDIR; @@ -1749,7 +1749,7 @@ nfsrvd_link(struct nfsrv_descript *nd, int isdgram, } nfsd_fhtovp(nd, &dfh, LK_EXCLUSIVE, &dp, &tnes, NULL, 0); if (dp) - NFSVOPUNLOCK(dp, 0); + NFSVOPUNLOCK(dp); } } NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, @@ -1906,7 +1906,7 @@ nfsrvd_symlinksub(struct nfsrv_descript *nd, struct nameidata *ndp, nvap, nd, p, 1, NULL); } if (vpp != NULL && nd->nd_repstat == 0) { - NFSVOPUNLOCK(ndp->ni_vp, 0); + NFSVOPUNLOCK(ndp->ni_vp); *vpp = ndp->ni_vp; } else vput(ndp->ni_vp); @@ -2039,7 +2039,7 @@ nfsrvd_mkdirsub(struct nfsrv_descript *nd, struct nameidata *ndp, nd->nd_repstat = nfsvno_getattr(vp, nvap, nd, p, 1, NULL); if (vpp && !nd->nd_repstat) { - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); *vpp = vp; } else { vput(vp); @@ -3079,7 +3079,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, * (ie: Leave the NFSVOPUNLOCK() about here.) */ if (vp) - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); if (stp) free(stp, M_NFSDSTATE); if (!nd->nd_repstat && dirp) diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index f0e63abebc4..277ff8ee9b2 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -562,7 +562,7 @@ nfsrvd_dorpc(struct nfsrv_descript *nd, int isdgram, u_char *tag, int taglen, if (nfs_retfh[nd->nd_procnum] == 1) { if (vp) - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); error = (*(nfsrv3_procs1[nd->nd_procnum]))(nd, isdgram, vp, NULL, (fhandle_t *)fh.nfsrvfh_data, &nes); } else if (nfs_retfh[nd->nd_procnum] == 2) { @@ -869,7 +869,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, vrele(vp); vp = nvp; cur_fsid = vp->v_mount->mnt_stat.f_fsid; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); vpnes = nes; } break; @@ -884,7 +884,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, vrele(vp); vp = nvp; cur_fsid = vp->v_mount->mnt_stat.f_fsid; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); vpnes = nes; } break; @@ -897,7 +897,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, vrele(vp); vp = nvp; cur_fsid = vp->v_mount->mnt_stat.f_fsid; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); vpnes = nes; } } else @@ -1014,7 +1014,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, } } /* Lookup ops return a locked vnode */ - NFSVOPUNLOCK(nvp, 0); + NFSVOPUNLOCK(nvp); } if (!nd->nd_repstat) { vrele(vp); diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index b5a7399685a..adf3e24e921 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -1555,7 +1555,7 @@ nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, tvp = NULL; else if (vp == NULL && cansleep != 0) { tvp = nfsvno_getvp(&lfp->lf_fh); - NFSVOPUNLOCK(tvp, 0); + NFSVOPUNLOCK(tvp); } else tvp = vp; gottvp = 1; @@ -1781,7 +1781,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, if (vnode_unlocked == 0) { ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl1"); vnode_unlocked = 1; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } reterr = nfsrv_locallock(vp, lfp, (new_lop->lo_flags & (NFSLCK_READ | NFSLCK_WRITE)), @@ -1955,7 +1955,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, if (vnode_unlocked == 0) { ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl2"); vnode_unlocked = 1; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); @@ -2039,7 +2039,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl3"); vnode_unlocked = 1; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); @@ -2151,7 +2151,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, NFSUNLOCKSTATE(); if (vnode_unlocked == 0) { ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl4"); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); @@ -2206,7 +2206,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, if (vnode_unlocked == 0) { ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl5"); vnode_unlocked = 1; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } /* Update the local locks. */ nfsrv_localunlock(vp, lfp, first, end, p); @@ -2248,7 +2248,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, if (filestruct_locked != 0) { if (vnode_unlocked == 0) { ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl6"); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } /* Roll back local locks. */ nfsrv_locallock_rollback(vp, lfp, p); @@ -2297,7 +2297,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, if (vnode_unlocked == 0) { ASSERT_VOP_ELOCKED(vp, "nfsrv_lockctrl7"); vnode_unlocked = 1; - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } nfsrv_locallock_rollback(vp, lfp, p); NFSLOCKSTATE(); @@ -3526,7 +3526,7 @@ nfsrv_openupdate(vnode_t vp, struct nfsstate *new_stp, nfsquad_t clientid, nfsrv_locklf(lfp); NFSUNLOCKSTATE(); ASSERT_VOP_ELOCKED(vp, "nfsrv_openupdate"); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); if (nfsrv_freeopen(stp, vp, 1, p) == 0) { NFSLOCKSTATE(); nfsrv_unlocklf(lfp); @@ -4975,7 +4975,7 @@ nfsrv_updatestable(NFSPROC_T *p) if (NFSVOPLOCK(vp, LK_EXCLUSIVE) == 0) { error = nfsvno_setattr(vp, &nva, NFSFPCRED(sf->nsf_fp), p, NULL); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } else error = EPERM; vn_finished_write(mp); @@ -5152,7 +5152,7 @@ nfsrv_clientconflict(struct nfsclient *clp, int *haslockp, vnode_t vp, NFSUNLOCKSTATE(); if (vp != NULL) { lktype = NFSVOPISLOCKED(vp); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsv4rootfs_lock); @@ -5327,7 +5327,7 @@ nfsrv_delegconflict(struct nfsstate *stp, int *haslockp, NFSPROC_T *p, NFSUNLOCKSTATE(); if (vp != NULL) { lktype = NFSVOPISLOCKED(vp); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsv4rootfs_lock); @@ -5555,7 +5555,7 @@ nfsd_recalldelegation(vnode_t vp, NFSPROC_T *p) do { if (NFSVOPLOCK(vp, LK_EXCLUSIVE) == 0) { error = nfsrv_checkremove(vp, 0, p); - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); } else error = EPERM; if (error == NFSERR_DELAY) { @@ -7585,7 +7585,7 @@ nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, M_NFSDSTATE, M_WAITOK | M_ZERO); ds->nfsdev_dvp = nd.ni_vp; ds->nfsdev_nmp = VFSTONFS(nd.ni_vp->v_mount); - NFSVOPUNLOCK(nd.ni_vp, 0); + NFSVOPUNLOCK(nd.ni_vp); dsdirsize = strlen(dspathp) + 16; dsdirpath = malloc(dsdirsize, M_TEMP, M_WAITOK); @@ -7611,7 +7611,7 @@ nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, break; } ds->nfsdev_dsdir[i] = nd.ni_vp; - NFSVOPUNLOCK(nd.ni_vp, 0); + NFSVOPUNLOCK(nd.ni_vp); } free(dsdirpath, M_TEMP); @@ -8221,7 +8221,7 @@ nfsrv_copymr(vnode_t vp, vnode_t fvp, vnode_t dvp, struct nfsdevice *ds, didprintf = 0; TAILQ_INIT(&thl); /* Unlock the MDS vp, so that a LayoutReturn can be done on it. */ - NFSVOPUNLOCK(vp, 0); + NFSVOPUNLOCK(vp); /* Now, do a recall for all layouts not yet recalled. */ tryagain: NFSDRECALLLOCK(); diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 361a878687d..f9a7f1ee0ee 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -113,7 +113,7 @@ nullfs_mount(struct mount *mp) */ if (mp->mnt_vnodecovered->v_op == &null_vnodeops && VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) { - VOP_UNLOCK(mp->mnt_vnodecovered, 0); + VOP_UNLOCK(mp->mnt_vnodecovered); isvnunlocked = true; } else { isvnunlocked = false; @@ -186,7 +186,7 @@ nullfs_mount(struct mount *mp) /* * Unlock the node (either the lower or the alias) */ - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (NULLVPTOLOWERVP(nullm_rootvp)->v_mount->mnt_flag & MNT_LOCAL) { MNT_ILOCK(mp); @@ -444,7 +444,7 @@ nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp) */ KASSERT((vp->v_iflag & VI_DOOMED) != 0, ("not reclaimed nullfs vnode %p", vp)); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else { /* * Otherwise, the nullfs vnode still shares the lock diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index a921d7ae084..ec2dcbb155d 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -410,7 +410,7 @@ null_lookup(struct vop_lookup_args *ap) * ldvp and locking dvp, which is also correct if the * locks are still shared. */ - VOP_UNLOCK(ldvp, 0); + VOP_UNLOCK(ldvp); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); } vdrop(ldvp); @@ -691,7 +691,7 @@ null_lock(struct vop_lock1_args *ap) panic("Unsupported lock request %d\n", ap->a_flags); } - VOP_UNLOCK(lvp, 0); + VOP_UNLOCK(lvp); error = vop_stdlock(ap); } vdrop(lvp); @@ -717,7 +717,7 @@ null_unlock(struct vop_unlock_args *ap) nn = VTONULL(vp); if (nn != NULL && (lvp = NULLVPTOLOWERVP(vp)) != NULL) { vholdnz(lvp); - error = VOP_UNLOCK(lvp, 0); + error = VOP_UNLOCK(lvp); vdrop(lvp); } else { error = vop_stdunlock(ap); @@ -865,7 +865,7 @@ null_vptocnp(struct vop_vptocnp_args *ap) vhold(lvp); mp = vp->v_mount; vfs_ref(mp); - VOP_UNLOCK(vp, 0); /* vp is held by vn_vptocnp_locked that called us */ + VOP_UNLOCK(vp); /* vp is held by vn_vptocnp_locked that called us */ ldvp = lvp; vref(lvp); error = vn_vptocnp(&ldvp, cred, ap->a_buf, ap->a_buflen); @@ -888,7 +888,7 @@ null_vptocnp(struct vop_vptocnp_args *ap) #ifdef DIAGNOSTIC NULLVPTOLOWERVP(*dvp); #endif - VOP_UNLOCK(*dvp, 0); /* keep reference on *dvp */ + VOP_UNLOCK(*dvp); /* keep reference on *dvp */ } vn_lock(vp, locked | LK_RETRY); vfs_rel(mp); diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c index 05dd6569a6b..2fee1303c64 100644 --- a/sys/fs/pseudofs/pseudofs_vncache.c +++ b/sys/fs/pseudofs/pseudofs_vncache.c @@ -293,7 +293,7 @@ pfs_purge_locked(struct pfs_node *pn, bool force) mtx_unlock(&pfs_vncache_mutex); VOP_LOCK(vnp, LK_EXCLUSIVE); vgone(vnp); - VOP_UNLOCK(vnp, 0); + VOP_UNLOCK(vnp); mtx_lock(&pfs_vncache_mutex); vdrop(vnp); pvd = pfs_vncache; diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index 25c50df07ea..30f68f5b684 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -273,7 +273,7 @@ pfs_ioctl(struct vop_ioctl_args *va) vn = va->a_vp; vn_lock(vn, LK_SHARED | LK_RETRY); if (vn->v_iflag & VI_DOOMED) { - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); return (EBADF); } pvd = vn->v_data; @@ -283,13 +283,13 @@ pfs_ioctl(struct vop_ioctl_args *va) pfs_assert_not_owned(pn); if (vn->v_type != VREG) { - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); PFS_RETURN (EINVAL); } KASSERT_PN_IS_FILE(pn); if (pn->pn_ioctl == NULL) { - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); PFS_RETURN (ENOTTY); } @@ -298,7 +298,7 @@ pfs_ioctl(struct vop_ioctl_args *va) * have changed since the open() call. */ if (!pfs_visible(curthread, pn, pvd->pvd_pid, &proc)) { - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); PFS_RETURN (EIO); } @@ -307,7 +307,7 @@ pfs_ioctl(struct vop_ioctl_args *va) if (proc != NULL) PROC_UNLOCK(proc); - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); PFS_RETURN (error); } @@ -404,7 +404,7 @@ pfs_vptocnp(struct vop_vptocnp_args *ap) * vp is held by caller. */ locked = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = pfs_vncache_alloc(mp, dvp, pn, pid); if (error) { @@ -414,7 +414,7 @@ pfs_vptocnp(struct vop_vptocnp_args *ap) } *buflen = i; - VOP_UNLOCK(*dvp, 0); + VOP_UNLOCK(*dvp); vn_lock(vp, locked | LK_RETRY); vfs_unbusy(mp); @@ -488,7 +488,7 @@ pfs_lookup(struct vop_cachedlookup_args *va) error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { vfs_ref(mp); - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); error = vfs_busy(mp, 0); vn_lock(vn, LK_EXCLUSIVE | LK_RETRY); vfs_rel(mp); @@ -499,7 +499,7 @@ pfs_lookup(struct vop_cachedlookup_args *va) PFS_RETURN(ENOENT); } } - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); KASSERT(pd->pn_parent != NULL, ("%s(): non-root directory has no parent", __func__)); /* @@ -648,7 +648,7 @@ pfs_read(struct vop_read_args *va) vhold(vn); locked = VOP_ISLOCKED(vn); - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); if (pn->pn_flags & PFS_RAWRD) { PFS_TRACE(("%zd resid", uio->uio_resid)); @@ -911,7 +911,7 @@ pfs_readlink(struct vop_readlink_args *va) } vhold(vn); locked = VOP_ISLOCKED(vn); - VOP_UNLOCK(vn, 0); + VOP_UNLOCK(vn); /* sbuf_new() can't fail with a static buffer */ sbuf_new(&sb, buf, sizeof buf, 0); diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c index 186c004e309..9671eae9422 100644 --- a/sys/fs/smbfs/smbfs_vfsops.c +++ b/sys/fs/smbfs/smbfs_vfsops.c @@ -234,7 +234,7 @@ smbfs_mount(struct mount *mp) vfs_mount_error(mp, "smbfs_root error: %d", error); goto bad; } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); SMBVDEBUG("root.v_usecount = %d\n", vrefcnt(vp)); #ifdef DIAGNOSTIC diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index 456d501d225..792cd9976cd 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -1337,7 +1337,7 @@ smbfs_lookup(ap) error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { vfs_ref(mp); - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); error = vfs_busy(mp, 0); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); vfs_rel(mp); @@ -1351,7 +1351,7 @@ smbfs_lookup(ap) goto out; } } - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); error = smbfs_nget(mp, dvp, name, nmlen, NULL, &vp); vfs_unbusy(mp); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index bea0d3ecc7c..0c3a99a249f 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -418,7 +418,7 @@ tmpfs_mount(struct mount *mp) vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY); error = VOP_GETATTR(mp->mnt_vnodecovered, &va, mp->mnt_cred); - VOP_UNLOCK(mp->mnt_vnodecovered, 0); + VOP_UNLOCK(mp->mnt_vnodecovered); if (error) return (error); diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 4bbf3485909..8254a563a16 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -670,9 +670,9 @@ tmpfs_rename_relock(struct vnode *fdvp, struct vnode **fvpp, struct tmpfs_dirent *de; int error, restarts = 0; - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); if (*tvpp != NULL && *tvpp != tdvp) - VOP_UNLOCK(*tvpp, 0); + VOP_UNLOCK(*tvpp); mp = fdvp->v_mount; relock: @@ -681,11 +681,11 @@ tmpfs_rename_relock(struct vnode *fdvp, struct vnode **fvpp, if (error) goto releout; if (vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { - VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fdvp); error = vn_lock(tdvp, LK_EXCLUSIVE); if (error) goto releout; - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); goto relock; } /* @@ -694,8 +694,8 @@ tmpfs_rename_relock(struct vnode *fdvp, struct vnode **fvpp, */ de = tmpfs_dir_lookup(VP_TO_TMPFS_DIR(fdvp), NULL, fcnp); if (de == NULL) { - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); if ((fcnp->cn_flags & ISDOTDOT) != 0 || (fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.')) error = EINVAL; @@ -705,14 +705,14 @@ tmpfs_rename_relock(struct vnode *fdvp, struct vnode **fvpp, } error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE | LK_NOWAIT, &nvp); if (error != 0) { - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); if (error != EBUSY) goto releout; error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE, &nvp); if (error != 0) goto releout; - VOP_UNLOCK(nvp, 0); + VOP_UNLOCK(nvp); /* * Concurrent rename race. */ @@ -727,7 +727,7 @@ tmpfs_rename_relock(struct vnode *fdvp, struct vnode **fvpp, } vrele(*fvpp); *fvpp = nvp; - VOP_UNLOCK(*fvpp, 0); + VOP_UNLOCK(*fvpp); /* * Re-resolve tvp and acquire the vnode lock if present. */ @@ -751,15 +751,15 @@ tmpfs_rename_relock(struct vnode *fdvp, struct vnode **fvpp, vrele(*tvpp); *tvpp = nvp; if (error != 0) { - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); if (error != EBUSY) goto releout; error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE, &nvp); if (error != 0) goto releout; - VOP_UNLOCK(nvp, 0); + VOP_UNLOCK(nvp); /* * fdvp contains fvp, thus tvp (=fdvp) is not empty. */ @@ -1040,7 +1040,7 @@ tmpfs_rename(struct vop_rename_args *v) out_locked: if (fdvp != tdvp && fdvp != tvp) - VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fdvp); out: /* Release target nodes. */ @@ -1473,7 +1473,7 @@ tmpfs_vptocnp_fill(struct vnode *vp, struct tmpfs_node *tn, } if (error == 0) { if (vp != *dvp) - VOP_UNLOCK(*dvp, 0); + VOP_UNLOCK(*dvp); } else { if (vp != *dvp) vput(*dvp); diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 45331dedab1..0f30b5ef36e 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -330,7 +330,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) g_topology_lock(); error = g_vfs_open(devvp, &cp, "udf", 0); g_topology_unlock(); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); if (error) goto bail; diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index faa95ea4904..b0714fe798b 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -359,9 +359,9 @@ unionfs_noderem(struct vnode *vp, struct thread *td) VI_UNLOCK(vp); if (lvp != NULLVP) - VOP_UNLOCK(lvp, LK_RELEASE); + VOP_UNLOCK(lvp); if (uvp != NULLVP) - VOP_UNLOCK(uvp, LK_RELEASE); + VOP_UNLOCK(uvp); if (dvp != NULLVP && unp->un_hash.le_prev != NULL) unionfs_rem_cached_vnode(unp, dvp); @@ -549,7 +549,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, cn->cn_flags |= NOCACHE; vref(dvp); - VOP_UNLOCK(dvp, LK_RELEASE); + VOP_UNLOCK(dvp); if ((error = relookup(dvp, vpp, cn))) { uma_zfree(namei_zone, cn->cn_pnbuf); @@ -959,7 +959,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, } unionfs_vn_create_on_upper_free_out1: - VOP_UNLOCK(udvp, LK_RELEASE); + VOP_UNLOCK(udvp); unionfs_vn_create_on_upper_free_out2: if (cn.cn_flags & HASBUF) { diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 8241bf85433..600b8dc8648 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -167,7 +167,7 @@ unionfs_domount(struct mount *mp) uid = va.va_uid; gid = va.va_gid; } - VOP_UNLOCK(mp->mnt_vnodecovered, LK_RELEASE); + VOP_UNLOCK(mp->mnt_vnodecovered); if (error) return (error); @@ -252,7 +252,7 @@ unionfs_domount(struct mount *mp) * Save reference */ if (below) { - VOP_UNLOCK(upperrootvp, LK_RELEASE); + VOP_UNLOCK(upperrootvp); vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY); ump->um_lowervp = upperrootvp; ump->um_uppervp = lowerrootvp; @@ -278,7 +278,7 @@ unionfs_domount(struct mount *mp) /* * Unlock the node */ - VOP_UNLOCK(ump->um_uppervp, LK_RELEASE); + VOP_UNLOCK(ump->um_uppervp); /* * Get the unionfs root vnode. diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 6f22df7a236..63840016305 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -128,7 +128,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) if (udvp != NULLVP) { dtmpvp = udvp; if (ldvp != NULLVP) - VOP_UNLOCK(ldvp, LK_RELEASE); + VOP_UNLOCK(ldvp); } else dtmpvp = ldvp; @@ -136,7 +136,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) error = VOP_LOOKUP(dtmpvp, &vp, cnp); if (dtmpvp == udvp && ldvp != NULLVP) { - VOP_UNLOCK(udvp, LK_RELEASE); + VOP_UNLOCK(udvp); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); } @@ -148,10 +148,10 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) */ if (nameiop == DELETE || nameiop == RENAME || (cnp->cn_lkflags & LK_TYPE_MASK)) - VOP_UNLOCK(vp, LK_RELEASE); + VOP_UNLOCK(vp); vrele(vp); - VOP_UNLOCK(dvp, LK_RELEASE); + VOP_UNLOCK(dvp); *(ap->a_vpp) = dunp->un_dvp; vref(dunp->un_dvp); @@ -188,7 +188,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) } if (nameiop == DELETE || nameiop == RENAME || (cnp->cn_lkflags & LK_TYPE_MASK)) - VOP_UNLOCK(uvp, LK_RELEASE); + VOP_UNLOCK(uvp); } /* check whiteout */ @@ -232,7 +232,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) return (lerror); } if (cnp->cn_lkflags & LK_TYPE_MASK) - VOP_UNLOCK(lvp, LK_RELEASE); + VOP_UNLOCK(lvp); } } @@ -267,7 +267,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) goto unionfs_lookup_out; if (LK_SHARED == (cnp->cn_lkflags & LK_TYPE_MASK)) - VOP_UNLOCK(vp, LK_RELEASE); + VOP_UNLOCK(vp); if (LK_EXCLUSIVE != VOP_ISLOCKED(vp)) { vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); lockflag = 1; @@ -275,7 +275,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) error = unionfs_mkshadowdir(MOUNTTOUNIONFSMOUNT(dvp->v_mount), udvp, VTOUNIONFS(vp), cnp, td); if (lockflag != 0) - VOP_UNLOCK(vp, LK_RELEASE); + VOP_UNLOCK(vp); if (error != 0) { UNIONFSDEBUG("unionfs_lookup: Unable to create shadow dir."); if ((cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) @@ -372,7 +372,7 @@ unionfs_create(struct vop_create_args *ap) if (vp->v_type == VSOCK) *(ap->a_vpp) = vp; else { - VOP_UNLOCK(vp, LK_RELEASE); + VOP_UNLOCK(vp); error = unionfs_nodeget(ap->a_dvp->v_mount, vp, NULLVP, ap->a_dvp, ap->a_vpp, cnp, curthread); vrele(vp); @@ -446,7 +446,7 @@ unionfs_mknod(struct vop_mknod_args *ap) if (vp->v_type == VSOCK) *(ap->a_vpp) = vp; else { - VOP_UNLOCK(vp, LK_RELEASE); + VOP_UNLOCK(vp); error = unionfs_nodeget(ap->a_dvp->v_mount, vp, NULLVP, ap->a_dvp, ap->a_vpp, cnp, curthread); vrele(vp); @@ -903,7 +903,7 @@ unionfs_ioctl(struct vop_ioctl_args *ap) unionfs_get_node_status(unp, ap->a_td, &unsp); ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp); unionfs_tryrem_node_status(unp, unsp); - VOP_UNLOCK(ap->a_vp, LK_RELEASE); + VOP_UNLOCK(ap->a_vp); if (ovp == NULLVP) return (EBADF); @@ -930,7 +930,7 @@ unionfs_poll(struct vop_poll_args *ap) unionfs_get_node_status(unp, ap->a_td, &unsp); ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp); unionfs_tryrem_node_status(unp, unsp); - VOP_UNLOCK(ap->a_vp, LK_RELEASE); + VOP_UNLOCK(ap->a_vp); if (ovp == NULLVP) return (EBADF); @@ -990,7 +990,7 @@ unionfs_remove(struct vop_remove_args *ap) ump = NULL; vp = uvp = lvp = NULLVP; /* search vnode */ - VOP_UNLOCK(ap->a_vp, LK_RELEASE); + VOP_UNLOCK(ap->a_vp); error = unionfs_relookup(udvp, &vp, cnp, &cn, td, cnp->cn_nameptr, strlen(cnp->cn_nameptr), DELETE); if (error != 0 && error != ENOENT) { @@ -1193,7 +1193,7 @@ unionfs_rename(struct vop_rename_args *ap) if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) goto unionfs_rename_abort; error = unionfs_copyfile(unp, 1, fcnp->cn_cred, td); - VOP_UNLOCK(fvp, LK_RELEASE); + VOP_UNLOCK(fvp); if (error != 0) goto unionfs_rename_abort; break; @@ -1201,7 +1201,7 @@ unionfs_rename(struct vop_rename_args *ap) if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) goto unionfs_rename_abort; error = unionfs_mkshadowdir(ump, rfdvp, unp, fcnp, td); - VOP_UNLOCK(fvp, LK_RELEASE); + VOP_UNLOCK(fvp); if (error != 0) goto unionfs_rename_abort; break; @@ -1258,13 +1258,13 @@ unionfs_rename(struct vop_rename_args *ap) if ((error = vn_lock(fdvp, LK_EXCLUSIVE)) != 0) goto unionfs_rename_abort; error = unionfs_relookup_for_delete(fdvp, fcnp, td); - VOP_UNLOCK(fdvp, LK_RELEASE); + 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, LK_RELEASE); + VOP_UNLOCK(tvp); error = unionfs_relookup_for_rename(tdvp, tcnp, td); if (tvp != NULLVP && tvp != tdvp) vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); @@ -1282,11 +1282,11 @@ unionfs_rename(struct vop_rename_args *ap) } if (ltdvp != NULLVP) - VOP_UNLOCK(ltdvp, LK_RELEASE); + VOP_UNLOCK(ltdvp); if (tdvp != rtdvp) vrele(tdvp); if (ltvp != NULLVP) - VOP_UNLOCK(ltvp, LK_RELEASE); + VOP_UNLOCK(ltvp); if (tvp != rtvp && tvp != NULLVP) { if (rtvp == NULLVP) vput(tvp); @@ -1360,7 +1360,7 @@ unionfs_mkdir(struct vop_mkdir_args *ap) } if ((error = VOP_MKDIR(udvp, &uvp, cnp, ap->a_vap)) == 0) { - VOP_UNLOCK(uvp, LK_RELEASE); + VOP_UNLOCK(uvp); cnp->cn_lkflags = LK_EXCLUSIVE; error = unionfs_nodeget(ap->a_dvp->v_mount, uvp, NULLVP, ap->a_dvp, ap->a_vpp, cnp, td); @@ -1458,7 +1458,7 @@ unionfs_symlink(struct vop_symlink_args *ap) if (udvp != NULLVP) { error = VOP_SYMLINK(udvp, &uvp, cnp, ap->a_vap, ap->a_target); if (error == 0) { - VOP_UNLOCK(uvp, LK_RELEASE); + VOP_UNLOCK(uvp); cnp->cn_lkflags = LK_EXCLUSIVE; error = unionfs_nodeget(ap->a_dvp->v_mount, uvp, NULLVP, ap->a_dvp, ap->a_vpp, cnp, td); @@ -1892,7 +1892,7 @@ unionfs_lock(struct vop_lock1_args *ap) if (unp == NULL) { /* vnode is released. */ VI_UNLOCK(vp); - VOP_UNLOCK(lvp, LK_RELEASE); + VOP_UNLOCK(lvp); vdrop(uvp); return (EBUSY); } @@ -1912,7 +1912,7 @@ unionfs_lock(struct vop_lock1_args *ap) /* vnode is released. */ VI_UNLOCK(vp); if (error == 0) - VOP_UNLOCK(lvp, LK_RELEASE); + VOP_UNLOCK(lvp); vdrop(lvp); if (uhold != 0) vdrop(uvp); @@ -1943,10 +1943,10 @@ unionfs_lock(struct vop_lock1_args *ap) /* vnode is released. */ VI_UNLOCK(vp); if (error == 0) - VOP_UNLOCK(uvp, LK_RELEASE); + VOP_UNLOCK(uvp); vdrop(uvp); if (lvp != NULLVP) { - VOP_UNLOCK(lvp, LK_RELEASE); + VOP_UNLOCK(lvp); vdrop(lvp); } return (vop_stdlock(ap)); @@ -2075,7 +2075,7 @@ unionfs_advlock(struct vop_advlock_args *ap) unionfs_tryrem_node_status(unp, unsp); } - VOP_UNLOCK(vp, LK_RELEASE); + VOP_UNLOCK(vp); error = VOP_ADVLOCK(uvp, ap->a_id, ap->a_op, ap->a_fl, ap->a_flags); @@ -2084,7 +2084,7 @@ unionfs_advlock(struct vop_advlock_args *ap) return error; unionfs_advlock_abort: - VOP_UNLOCK(vp, LK_RELEASE); + VOP_UNLOCK(vp); UNIONFS_INTERNAL_DEBUG("unionfs_advlock: leave (%d)\n", error); diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c index c7cc4d9f1eb..dad18b37aa4 100644 --- a/sys/i386/linux/imgact_linux.c +++ b/sys/i386/linux/imgact_linux.c @@ -115,7 +115,7 @@ exec_linux_imgact(struct image_params *imgp) } PROC_UNLOCK(imgp->proc); - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); /* * Destroy old process VM and create a new one (with a new stack) diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index 0ca39b69d90..00d4dada996 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -260,7 +260,7 @@ exec_aout_imgact(struct image_params *imgp) * However, in cases where the vnode lock is external, such as nullfs, * v_usecount may become zero. */ - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); /* * Destroy old process VM and create a new one (with a new stack) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index c1fef239c71..fb96c2c6681 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -536,7 +536,7 @@ __elfN(map_insert)(struct image_params *imgp, vm_map_t map, vm_object_t object, (object != NULL ? MAP_VN_EXEC : 0)); if (rv != KERN_SUCCESS) { locked = VOP_ISLOCKED(imgp->vp); - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); vm_object_deallocate(object); vn_lock(imgp->vp, locked | LK_RETRY); return (rv); @@ -951,7 +951,7 @@ __elfN(get_interp)(struct image_params *imgp, const Elf_Phdr *phdr, */ interp = malloc(interp_name_len + 1, M_TEMP, M_NOWAIT); if (interp == NULL) { - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); interp = malloc(interp_name_len + 1, M_TEMP, M_WAITOK); vn_lock(imgp->vp, LK_SHARED | LK_RETRY); } @@ -1171,7 +1171,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) * The VV_TEXT flag prevents modifications to the executable while * the vnode is unlocked. */ - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); /* * Decide whether to enable randomization of user mappings. @@ -1255,7 +1255,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) imgp->entry_addr = entry; if (interp != NULL) { - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); if ((map->flags & MAP_ASLR) != 0) { /* Assume that interpeter fits into 1/4 of AS */ maxv1 = maxv / 2 + addr / 2; @@ -1276,7 +1276,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) */ elf_auxargs = malloc(sizeof(Elf_Auxargs), M_TEMP, M_NOWAIT); if (elf_auxargs == NULL) { - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); elf_auxargs = malloc(sizeof(Elf_Auxargs), M_TEMP, M_WAITOK); vn_lock(imgp->vp, LK_SHARED | LK_RETRY); } @@ -2547,7 +2547,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, pnote->p_filesz > PAGE_SIZE - pnote->p_offset) { buf = malloc(pnote->p_filesz, M_TEMP, M_NOWAIT); if (buf == NULL) { - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); buf = malloc(pnote->p_filesz, M_TEMP, M_WAITOK); vn_lock(imgp->vp, LK_SHARED | LK_RETRY); } diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index b1602c6bb59..a590c9a76de 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -226,12 +226,12 @@ sys_acct(struct thread *td, struct acct_args *uap) #ifdef MAC error = mac_system_check_acct(td->td_ucred, nd.ni_vp); if (error) { - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); vn_close(nd.ni_vp, flags, td->td_ucred, td); return (error); } #endif - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); if (nd.ni_vp->v_type != VREG) { vn_close(nd.ni_vp, flags, td->td_ucred, td); return (EACCES); diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c index 038540b2ed1..ec5a2fc9ec1 100644 --- a/sys/kern/kern_alq.c +++ b/sys/kern/kern_alq.c @@ -376,7 +376,7 @@ alq_doio(struct alq *alq) if (mac_vnode_check_write(alq->aq_cred, NOCRED, vp) == 0) #endif VOP_WRITE(vp, &auio, IO_UNIT | IO_APPEND, alq->aq_cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); ALQ_LOCK(alq); @@ -453,7 +453,7 @@ alq_open_flags(struct alq **alqp, const char *file, struct ucred *cred, int cmod NDFREE(&nd, NDF_ONLY_PNBUF); /* We just unlock so we hold a reference */ - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); alq = malloc(sizeof(*alq), M_ALD, M_WAITOK|M_ZERO); alq->aq_vp = nd.ni_vp; diff --git a/sys/kern/kern_ctf.c b/sys/kern/kern_ctf.c index 2d0232ca8db..6a6a0803313 100644 --- a/sys/kern/kern_ctf.c +++ b/sys/kern/kern_ctf.c @@ -293,7 +293,7 @@ link_elf_ctf_get(linker_file_t lf, linker_ctf_t *lc) lc->typlenp = &ef->typlen; out: - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); vn_close(nd.ni_vp, FREAD, td->td_ucred, td); if (hdr != NULL) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 80376910155..f11a3a4e285 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -787,7 +787,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) } else { atomic_clear_int(&fp->f_flag, FRDAHEAD); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); fdrop(fp, td); break; @@ -1458,7 +1458,7 @@ kern_fpathconf(struct thread *td, int fd, int name, long *valuep) if (vp != NULL) { vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_PATHCONF(vp, name, valuep); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else if (fp->f_type == DTYPE_PIPE || fp->f_type == DTYPE_SOCKET) { if (name != _PC_PIPE_BUF) { error = EINVAL; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index e148e0b1f20..d2fb9355227 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -520,7 +520,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p) (imgp->vp->v_mount->mnt_flag & MNT_NOSUID) == 0 && (p->p_flag & P_TRACED) == 0) { imgp->credential_setid = true; - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); imgp->newcred = crdup(oldcred); if (attr.va_mode & S_ISUID) { euip = uifind(attr.va_uid); @@ -553,7 +553,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p) */ if (oldcred->cr_svuid != oldcred->cr_uid || oldcred->cr_svgid != oldcred->cr_gid) { - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); imgp->newcred = crdup(oldcred); vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); change_svuid(imgp->newcred, imgp->newcred->cr_uid); @@ -568,7 +568,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p) if (args->fname != NULL && args->fname[0] == '/') imgp->execpath = args->fname; else { - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); if (vn_fullpath(td, imgp->vp, &imgp->execpath, &imgp->freepath) != 0) imgp->execpath = args->fname; @@ -649,7 +649,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p) * NB: We unlock the vnode here because it is believed that none * of the sv_copyout_strings/sv_fixup operations require the vnode. */ - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); if (disallow_high_osrel && P_OSREL_MAJOR(p->p_osrel) > P_OSREL_MAJOR(__FreeBSD_version)) { @@ -776,7 +776,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p) * taking sleepable locks, so temporarily drop our locks. */ PROC_UNLOCK(p); - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); fdsetugidsafety(td); error = fdcheckstd(td); vn_lock(imgp->vp, LK_SHARED | LK_RETRY); @@ -847,7 +847,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p) * P_INEXEC flag is cleared. */ if (PMC_SYSTEM_SAMPLING_ACTIVE() || PMC_PROC_IS_USING_PMCS(p)) { - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); pe.pm_credentialschanged = credential_changing; pe.pm_entryaddr = imgp->entry_addr; @@ -877,7 +877,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p) if (error != 0) vput(imgp->vp); else - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp); } if (imgp->object != NULL) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 8bef36c319c..dfd72ab88c1 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -939,7 +939,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) vput(root); goto done_free; } - VOP_UNLOCK(root, 0); + VOP_UNLOCK(root); if (fullpath_disabled) { /* Leave room for a real-root full pathname. */ if (len + (path[0] == '/' && strcmp(mypr->pr_path, "/") @@ -2393,7 +2393,7 @@ do_jail_attach(struct thread *td, struct prison *pr) if ((error = mac_vnode_check_chroot(td->td_ucred, pr->pr_root))) goto e_unlock; #endif - VOP_UNLOCK(pr->pr_root, 0); + VOP_UNLOCK(pr->pr_root); if ((error = pwd_chroot(td, pr->pr_root))) goto e_revert_osd; @@ -2417,7 +2417,7 @@ do_jail_attach(struct thread *td, struct prison *pr) return (0); e_unlock: - VOP_UNLOCK(pr->pr_root, 0); + VOP_UNLOCK(pr->pr_root); e_revert_osd: /* Tell modules this thread is still in its old jail after all. */ (void)osd_jail_call(td->td_ucred->cr_prison, PR_METHOD_ATTACH, td); diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 9216b515f68..a6788afad3b 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -941,7 +941,7 @@ sys_ktrace(struct thread *td, struct ktrace_args *uap) } NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (vp->v_type != VREG) { (void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td); ktrace_exit(td); @@ -1242,7 +1242,7 @@ ktr_writerequest(struct thread *td, struct ktr_request *req) if (error == 0) #endif error = VOP_WRITE(vp, &auio, IO_UNIT | IO_APPEND, cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); crfree(cred); if (!error) { diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 6dc21886066..6356476b547 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -1809,7 +1809,7 @@ linker_lookup_file(const char *path, int pathlen, const char *name, type = nd.ni_vp->v_type; if (vap) VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); vn_close(nd.ni_vp, FREAD, td->td_ucred, td); if (type == VREG) return (result); @@ -1874,7 +1874,7 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname, UIO_SYSSPACE, IO_NODELOCKED, cred, NOCRED, &reclen, td); if (error) goto bad; - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); vn_close(nd.ni_vp, FREAD, cred, td); nd.ni_vp = NULL; if (reclen != 0) { @@ -1942,7 +1942,7 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname, if (hints) free(hints, M_TEMP); if (nd.ni_vp != NULL) { - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); vn_close(nd.ni_vp, FREAD, cred, td); } /* diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 14a740332e5..a6f56736d38 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -875,7 +875,7 @@ killjobc(void) sx_xunlock(&proctree_lock); if (vn_lock(ttyvp, LK_EXCLUSIVE) == 0) { VOP_REVOKE(ttyvp, REVOKEALL); - VOP_UNLOCK(ttyvp, 0); + VOP_UNLOCK(ttyvp); } vrele(ttyvp); sx_xlock(&proctree_lock); diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 5c8dfa7e5b4..aa1395b35d0 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -519,7 +519,7 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res, out: if (vp != NULL) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } @@ -739,7 +739,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, goto done; error = VOP_GETATTR(vp, &va, td->td_ucred); if (error != 0 || off >= va.va_size) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); goto done; } if (va.va_size != obj_size) { @@ -805,7 +805,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, rhpages, flags); if (error != 0) { if (vp != NULL) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); free(sfio, M_TEMP); goto done; } @@ -988,7 +988,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, } if (vp != NULL) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* Keep track of bytes processed. */ off += space; diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 52f12ab8478..c24254822fb 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -510,21 +510,21 @@ kern_reroot(void) error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { vfs_ref(mp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = vfs_busy(mp, 0); vn_lock(vp, LK_SHARED | LK_RETRY); vfs_rel(mp); if (error != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (ENOENT); } if (vp->v_iflag & VI_DOOMED) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vfs_unbusy(mp); return (ENOENT); } } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* * Remove the filesystem containing currently-running executable diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 067de64f808..76709ce9fc6 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3331,7 +3331,7 @@ static void vnode_close_locked(struct thread *td, struct vnode *vp) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_close(vp, FWRITE, td->td_ucred, td); } @@ -3614,12 +3614,12 @@ coredump(struct thread *td) if (vp->v_type != VREG || VOP_GETATTR(vp, &vattr, cred) != 0 || vattr.va_nlink != 1 || (vp->v_vflag & VV_SYSTEM) != 0 || vattr.va_uid != cred->cr_uid) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = EFAULT; goto out; } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* Postpone other writers, including core dumps of other processes. */ rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); @@ -3636,7 +3636,7 @@ coredump(struct thread *td) vattr.va_flags = UF_NODUMP; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VOP_SETATTR(vp, &vattr, cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); PROC_LOCK(p); p->p_acflag |= ACORE; PROC_UNLOCK(p); diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 8d07dd5bbb7..d482a0dea0d 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -1062,7 +1062,7 @@ link_elf_load_file(linker_class_t cls, const char* filename, #endif link_elf_reloc_local(lf); - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); error = linker_load_dependencies(lf); vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); if (error != 0) @@ -1146,7 +1146,7 @@ link_elf_load_file(linker_class_t cls, const char* filename, *result = lf; out: - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); vn_close(nd.ni_vp, FREAD, td->td_ucred, td); if (error != 0 && lf != NULL) linker_file_unload(lf, LINKER_UNLOAD_FORCE); diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 55c2f7de387..5cb5683672e 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -1001,7 +1001,7 @@ link_elf_load_file(linker_class_t cls, const char *filename, goto out; /* Pull in dependencies */ - VOP_UNLOCK(nd->ni_vp, 0); + VOP_UNLOCK(nd->ni_vp); error = linker_load_dependencies(lf); vn_lock(nd->ni_vp, LK_EXCLUSIVE | LK_RETRY); if (error) @@ -1030,7 +1030,7 @@ link_elf_load_file(linker_class_t cls, const char *filename, *result = lf; out: - VOP_UNLOCK(nd->ni_vp, 0); + VOP_UNLOCK(nd->ni_vp); vn_close(nd->ni_vp, FREAD, td->td_ucred, td); free(nd, M_TEMP); if (error && lf) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 0f5b48cea1f..d80b7969657 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -725,7 +725,7 @@ do_recycle(void *context, int pending __unused) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vrecycle(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); } @@ -893,7 +893,7 @@ mqfs_lookupx(struct vop_cachedlookup_args *ap) return (EIO); if ((flags & ISLASTCN) && nameiop != LOOKUP) return (EINVAL); - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); KASSERT(pd->mn_parent, ("non-root directory has no parent")); pn = pd->mn_parent; error = mqfs_allocv(dvp->v_mount, vpp, pn); diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 1a875d7e5ed..255c08decac 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -654,7 +654,7 @@ uipc_bindat(int fd, struct socket *so, struct sockaddr *nam, struct thread *td) unp->unp_addr = soun; unp->unp_flags &= ~UNP_BINDING; UNP_PCB_UNLOCK(unp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); free(buf, M_TEMP); return (0); diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c index 56192cfbe62..4fee9e858e9 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -253,7 +253,7 @@ vacl_set_acl(struct thread *td, struct vnode *vp, acl_type_t type, #ifdef MAC out_unlock: #endif - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); out: acl_free(inkernelacl); @@ -285,7 +285,7 @@ vacl_get_acl(struct thread *td, struct vnode *vp, acl_type_t type, #ifdef MAC out: #endif - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error == 0) error = acl_copyout(inkernelacl, aclp, type); acl_free(inkernelacl); @@ -316,7 +316,7 @@ vacl_delete(struct thread *td, struct vnode *vp, acl_type_t type) #ifdef MAC out: #endif - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); return (error); } diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 995cfef8344..796e0b38b0e 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -733,7 +733,7 @@ aio_fsync_vnode(struct thread *td, struct vnode *vp) } error = VOP_FSYNC(vp, MNT_WAIT, td); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); drop: return (error); diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 9dda13677a3..2e1e3446d33 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3532,7 +3532,7 @@ flushbufqueues(struct vnode *lvp, struct bufdomain *bd, int target, } vn_finished_write(mp); if (unlock) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); flushwithdeps += hasdeps; flushed++; diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index b7913ea78e6..e9fe85df579 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1367,7 +1367,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, ltype = 0; /* silence gcc warning */ if (cnp->cn_flags & ISDOTDOT) { ltype = VOP_ISLOCKED(dvp); - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); } vhold(*vpp); cache_lookup_unlock(blp, dvlp); @@ -2500,7 +2500,7 @@ vn_path_to_global_path(struct thread *td, struct vnode *vp, char *path, return (ENODEV); /* Construct global filesystem path from vp. */ - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = vn_fullpath_global(td, vp, &rpath, &fbuf); if (error != 0) { diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index e7beb98b10b..89621610050 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -419,7 +419,7 @@ vop_stdadvlock(struct vop_advlock_args *ap) */ vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, curthread->td_ucred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error) return (error); } else @@ -440,7 +440,7 @@ vop_stdadvlockasync(struct vop_advlockasync_args *ap) /* The size argument is only needed for SEEK_END. */ vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, curthread->td_ucred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error) return (error); } else @@ -747,7 +747,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) VREF(vp); locked = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); NDINIT_ATVP(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE, "..", vp, td); flags = FREAD; @@ -765,7 +765,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) ((*dvp)->v_mount->mnt_flag & MNT_UNION)) { *dvp = (*dvp)->v_mount->mnt_vnodecovered; VREF(mvp); - VOP_UNLOCK(mvp, 0); + VOP_UNLOCK(mvp); vn_close(mvp, FREAD, cred, td); VREF(*dvp); vn_lock(*dvp, LK_SHARED | LK_RETRY); @@ -796,15 +796,15 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) if ((dp->d_type != DT_WHT) && (dp->d_fileno == fileno)) { if (covered) { - VOP_UNLOCK(*dvp, 0); + VOP_UNLOCK(*dvp); vn_lock(mvp, LK_SHARED | LK_RETRY); if (dirent_exists(mvp, dp->d_name, td)) { error = ENOENT; - VOP_UNLOCK(mvp, 0); + VOP_UNLOCK(mvp); vn_lock(*dvp, LK_SHARED | LK_RETRY); goto out; } - VOP_UNLOCK(mvp, 0); + VOP_UNLOCK(mvp); vn_lock(*dvp, LK_SHARED | LK_RETRY); } i -= dp->d_namlen; @@ -834,7 +834,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) vput(*dvp); vrele(mvp); } else { - VOP_UNLOCK(mvp, 0); + VOP_UNLOCK(mvp); vn_close(mvp, FREAD, cred, td); } vn_lock(vp, locked | LK_RETRY); @@ -997,7 +997,7 @@ vop_stdadvise(struct vop_advise_args *ap) error = 0; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_iflag & VI_DOOMED) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); break; } @@ -1037,7 +1037,7 @@ vop_stdadvise(struct vop_advise_args *ap) if (error == 0) error = bnoreuselist(&bo->bo_dirty, bo, startn, endn); BO_RUNLOCK(bo); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); break; default: error = EINVAL; @@ -1180,7 +1180,7 @@ vop_stdioctl(struct vop_ioctl_args *ap) else if (ap->a_command == FIOSEEKHOLE) *offp = va.va_size; } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); break; default: error = ENOTTY; @@ -1328,7 +1328,7 @@ vfs_stdextattrctl(mp, cmd, filename_vp, attrnamespace, attrname) { if (filename_vp != NULL) - VOP_UNLOCK(filename_vp, 0); + VOP_UNLOCK(filename_vp); return (EOPNOTSUPP); } diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 4086289afa0..f9451527d25 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -124,7 +124,7 @@ sys_extattrctl(struct thread *td, struct extattrctl_args *uap) mp = NULL; goto out; } - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | PCATCH); NDFREE(&nd, NDF_NO_VP_UNLOCK); if (error) @@ -213,7 +213,7 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, const char *attrname, #ifdef MAC done: #endif - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); return (error); } @@ -381,7 +381,7 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname, #ifdef MAC done: #endif - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } @@ -517,7 +517,7 @@ extattr_delete_vp(struct vnode *vp, int attrnamespace, const char *attrname, #ifdef MAC done: #endif - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); return (error); } @@ -656,14 +656,14 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data, #ifdef MAC error = mac_vnode_check_listextattr(td->td_ucred, vp, attrnamespace); if (error) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } #endif error = VOP_LISTEXTATTR(vp, attrnamespace, auiop, sizep, td->td_ucred, td); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (auiop != NULL) { cnt -= auio.uio_resid; diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 397d303e878..e4571fea59a 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -802,7 +802,7 @@ lookup(struct nameidata *ndp) AUDIT_ARG_VNODE2(dp); if (!(cnp->cn_flags & (LOCKPARENT | LOCKLEAF))) - VOP_UNLOCK(dp, 0); + VOP_UNLOCK(dp); /* XXX This should probably move to the top of function. */ if (cnp->cn_flags & SAVESTART) panic("lookup: SAVESTART"); @@ -971,7 +971,7 @@ lookup(struct nameidata *ndp) goto bad; } if ((cnp->cn_flags & LOCKPARENT) == 0) - VOP_UNLOCK(dp, 0); + VOP_UNLOCK(dp); /* * We return with ni_vp NULL to indicate that the entry * doesn't currently exist, leaving a pointer to the @@ -1040,7 +1040,7 @@ lookup(struct nameidata *ndp) * Symlink code always expects an unlocked dvp. */ if (ndp->ni_dvp != ndp->ni_vp) { - VOP_UNLOCK(ndp->ni_dvp, 0); + VOP_UNLOCK(ndp->ni_dvp); ni_dvp_unlocked = 1; } goto success; @@ -1112,7 +1112,7 @@ lookup(struct nameidata *ndp) else vrele(ndp->ni_dvp); } else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp) { - VOP_UNLOCK(ndp->ni_dvp, 0); + VOP_UNLOCK(ndp->ni_dvp); ni_dvp_unlocked = 1; } @@ -1122,7 +1122,7 @@ lookup(struct nameidata *ndp) AUDIT_ARG_VNODE2(dp); if ((cnp->cn_flags & LOCKLEAF) == 0) - VOP_UNLOCK(dp, 0); + VOP_UNLOCK(dp); success: /* * Because of shared lookup we may have the vnode shared locked, but @@ -1202,7 +1202,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) KASSERT(dp->v_type == VDIR, ("dp is not a directory")); if (!(cnp->cn_flags & LOCKLEAF)) - VOP_UNLOCK(dp, 0); + VOP_UNLOCK(dp); *vpp = dp; /* XXX This should probably move to the top of function. */ if (cnp->cn_flags & SAVESTART) @@ -1235,7 +1235,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) if (cnp->cn_flags & SAVESTART) VREF(dvp); if ((cnp->cn_flags & LOCKPARENT) == 0) - VOP_UNLOCK(dp, 0); + VOP_UNLOCK(dp); /* * We return with ni_vp NULL to indicate that the entry * doesn't currently exist, leaving a pointer to the @@ -1263,7 +1263,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) */ if ((cnp->cn_flags & LOCKPARENT) == 0 && dvp != dp) { if (wantparent) - VOP_UNLOCK(dvp, 0); + VOP_UNLOCK(dvp); else vput(dvp); } else if (!wantparent) @@ -1279,7 +1279,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) VREF(dvp); if ((cnp->cn_flags & LOCKLEAF) == 0) - VOP_UNLOCK(dp, 0); + VOP_UNLOCK(dp); return (0); bad: vput(dp); @@ -1341,7 +1341,7 @@ NDFREE(struct nameidata *ndp, const u_int flags) ndp->ni_vp = NULL; } if (unlock_vp) - VOP_UNLOCK(ndp->ni_vp, 0); + VOP_UNLOCK(ndp->ni_vp); if (!(flags & NDF_NO_DVP_RELE) && (ndp->ni_cnd.cn_flags & (LOCKPARENT|WANTPARENT))) { if (unlock_dvp) { @@ -1352,7 +1352,7 @@ NDFREE(struct nameidata *ndp, const u_int flags) ndp->ni_dvp = NULL; } if (unlock_dvp) - VOP_UNLOCK(ndp->ni_dvp, 0); + VOP_UNLOCK(ndp->ni_dvp); if (!(flags & NDF_NO_STARTDIR_RELE) && (ndp->ni_cnd.cn_flags & SAVESTART)) { vrele(ndp->ni_startdir); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index cf16728a94e..bf18d5569e8 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -880,7 +880,7 @@ vfs_domount_first( vput(vp); return (error); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* Allocate and initialize the filesystem. */ mp = vfs_mount_alloc(vp, vfsp, fspath, td->td_ucred); @@ -912,7 +912,7 @@ vfs_domount_first( vrele(vp); return (error); } - VOP_UNLOCK(newdp, 0); + VOP_UNLOCK(newdp); if (mp->mnt_opt != NULL) vfs_freeopts(mp->mnt_opt); @@ -944,9 +944,9 @@ vfs_domount_first( mtx_unlock(&mountlist_mtx); vfs_event_signal(NULL, VQ_MOUNT, 0); vn_lock(newdp, LK_EXCLUSIVE | LK_RETRY); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); EVENTHANDLER_DIRECT_INVOKE(vfs_mounted, mp, newdp, td); - VOP_UNLOCK(newdp, 0); + VOP_UNLOCK(newdp); mountcheckdirs(vp, newdp); vrele(newdp); if ((mp->mnt_flag & MNT_RDONLY) == 0) @@ -1017,7 +1017,7 @@ vfs_domount_update( } vp->v_iflag |= VI_MOUNT; VI_UNLOCK(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { @@ -1330,7 +1330,7 @@ dounmount_cleanup(struct mount *mp, struct vnode *coveredvp, int mntkflags) } MNT_IUNLOCK(mp); if (coveredvp != NULL) { - VOP_UNLOCK(coveredvp, 0); + VOP_UNLOCK(coveredvp); vdrop(coveredvp); } vn_finished_write(mp); @@ -1358,7 +1358,7 @@ dounmount(struct mount *mp, int flags, struct thread *td) */ if (coveredvp->v_mountedhere != mp || coveredvp->v_mountedhere->mnt_gen != mnt_gen_r) { - VOP_UNLOCK(coveredvp, 0); + VOP_UNLOCK(coveredvp); vdrop(coveredvp); vfs_rel(mp); return (EBUSY); @@ -1372,7 +1372,7 @@ dounmount(struct mount *mp, int flags, struct thread *td) error = vfs_suser(mp, td); if (error != 0) { if (coveredvp != NULL) { - VOP_UNLOCK(coveredvp, 0); + VOP_UNLOCK(coveredvp); vdrop(coveredvp); } vfs_rel(mp); @@ -1471,7 +1471,7 @@ dounmount(struct mount *mp, int flags, struct thread *td) } MNT_IUNLOCK(mp); if (coveredvp) - VOP_UNLOCK(coveredvp, 0); + VOP_UNLOCK(coveredvp); return (error); } mtx_lock(&mountlist_mtx); @@ -1480,7 +1480,7 @@ dounmount(struct mount *mp, int flags, struct thread *td) EVENTHANDLER_DIRECT_INVOKE(vfs_unmounted, mp, td); if (coveredvp != NULL) { coveredvp->v_mountedhere = NULL; - VOP_UNLOCK(coveredvp, 0); + VOP_UNLOCK(coveredvp); } vfs_event_signal(NULL, VQ_UNMOUNT, 0); if (rootvnode != NULL && mp == rootvnode->v_mount) { diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index ece960e6be8..9cf1a6d809a 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -214,7 +214,7 @@ set_rootvnode(void) if (VFS_ROOT(TAILQ_FIRST(&mountlist), LK_EXCLUSIVE, &rootvnode)) panic("set_rootvnode: Cannot find root vnode"); - VOP_UNLOCK(rootvnode, 0); + VOP_UNLOCK(rootvnode); p = curthread->td_proc; FILEDESC_XLOCK(p->p_fd); @@ -350,7 +350,7 @@ vfs_mountroot_shuffle(struct thread *td, struct mount *mpdevfs) vp->v_mountedhere = mporoot; strlcpy(mporoot->mnt_stat.f_mntonname, fspath, MNAMELEN); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else vput(vp); } @@ -378,7 +378,7 @@ vfs_mountroot_shuffle(struct thread *td, struct mount *mpdevfs) } mpdevfs->mnt_vnodecovered = vp; vp->v_mountedhere = mpdevfs; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else vput(vp); } @@ -940,7 +940,7 @@ vfs_mountroot_readconf(struct thread *td, struct sbuf *sb) ofs += len - resid; } - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); vn_close(nd.ni_vp, FREAD, td->td_ucred, td); return (error); } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index deb8cce9d41..3b73d085a2f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -415,7 +415,7 @@ sysctl_ftry_reclaim_vnode(SYSCTL_HANDLER_ARGS) counter_u64_add(recycles_count, 1); vgone(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); drop: fdrop(fp, td); return (error); @@ -1034,7 +1034,7 @@ vlrureclaim(struct mount *mp, bool reclaim_nc_src, int trigger) (vp->v_iflag & VI_FREE) != 0 || (vp->v_object != NULL && vp->v_object->resident_page_count > trigger)) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdropl(vp); goto next_iter_mntunlocked; } @@ -1042,7 +1042,7 @@ vlrureclaim(struct mount *mp, bool reclaim_nc_src, int trigger) ("VI_DOOMED unexpectedly detected in vlrureclaim()")); counter_u64_add(recycles_count, 1); vgonel(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdropl(vp); done++; next_iter_mntunlocked: @@ -1384,7 +1384,7 @@ vtryrecycle(struct vnode *vp) * Don't recycle if its filesystem is being suspended. */ if (vn_start_write(vp, &vnmp, V_NOWAIT) != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); CTR2(KTR_VFS, "%s: impossible to recycle, cannot start the write for %p", __func__, vp); @@ -1398,7 +1398,7 @@ vtryrecycle(struct vnode *vp) */ VI_LOCK(vp); if (vp->v_usecount) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); VI_UNLOCK(vp); vn_finished_write(vnmp); CTR2(KTR_VFS, @@ -1410,7 +1410,7 @@ vtryrecycle(struct vnode *vp) counter_u64_add(recycles_count, 1); vgonel(vp); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); VI_UNLOCK(vp); vn_finished_write(vnmp); return (0); @@ -2316,7 +2316,7 @@ sync_vnode(struct synclist *slp, struct bufobj **bo, struct thread *td) } vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); (void) VOP_FSYNC(vp, MNT_LAZY, td); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); BO_LOCK(*bo); if (((*bo)->bo_flag & BO_ONWORKLST) != 0) { @@ -2858,7 +2858,7 @@ vputx(struct vnode *vp, int func) if (vp->v_type != VCHR && refcount_release_if_not_last(&vp->v_usecount)) { if (func == VPUTX_VPUT) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); return; } @@ -2873,7 +2873,7 @@ vputx(struct vnode *vp, int func) if (!refcount_release(&vp->v_usecount) || (vp->v_iflag & VI_DOINGINACT)) { if (func == VPUTX_VPUT) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); v_decr_devcount(vp); vdropl(vp); return; @@ -2920,7 +2920,7 @@ vputx(struct vnode *vp, int func) if (vp->v_iflag & VI_OWEINACT) vinactive(vp, curthread); if (func != VPUTX_VUNREF) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } vdropl(vp); } @@ -3271,7 +3271,7 @@ vflush(struct mount *mp, int rootrefs, int flags, struct thread *td) * Skip over a vnodes marked VV_SYSTEM. */ if ((flags & SKIPSYSTEM) && (vp->v_vflag & VV_SYSTEM)) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); continue; } @@ -3288,7 +3288,7 @@ vflush(struct mount *mp, int rootrefs, int flags, struct thread *td) } error = VOP_FSYNC(vp, MNT_WAIT, td); if (error != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); return (error); @@ -3299,7 +3299,7 @@ vflush(struct mount *mp, int rootrefs, int flags, struct thread *td) if ((vp->v_type == VNON || (error == 0 && vattr.va_nlink > 0)) && (vp->v_writecount <= 0 || vp->v_type != VREG)) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdropl(vp); continue; } @@ -3320,7 +3320,7 @@ vflush(struct mount *mp, int rootrefs, int flags, struct thread *td) vn_printf(vp, "vflush: busy vnode "); #endif } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdropl(vp); } if (rootrefs > 0 && (flags & FORCECLOSE) == 0) { @@ -3336,7 +3336,7 @@ vflush(struct mount *mp, int rootrefs, int flags, struct thread *td) if (busy == 1 && rootvp->v_usecount == rootrefs) { VOP_LOCK(rootvp, LK_EXCLUSIVE|LK_INTERLOCK); vgone(rootvp); - VOP_UNLOCK(rootvp, 0); + VOP_UNLOCK(rootvp); busy = 0; } else VI_UNLOCK(rootvp); @@ -4381,7 +4381,7 @@ vfs_allocate_syncvnode(struct mount *mp) if (error != 0) panic("vfs_allocate_syncvnode: insmntque() failed"); vp->v_vflag &= ~VV_FORCEINSMQ; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* * Place the vnode onto the syncer worklist. We attempt to * scatter them about on the list so that they will go off @@ -5202,7 +5202,7 @@ vfs_knlunlock(void *arg) { struct vnode *vp = arg; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } static void diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 6a1547854c9..d8c14d94b6a 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -359,7 +359,7 @@ kern_fstatfs(struct thread *td, int fd, struct statfs *buf) mp = vp->v_mount; if (mp != NULL) vfs_ref(mp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); fdrop(fp, td); return (kern_do_statfs(td, mp, buf)); } @@ -847,7 +847,7 @@ sys_fchdir(struct thread *td, struct fchdir_args *uap) vput(vp); return (error); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); pwd_chdir(td, vp); return (0); } @@ -882,7 +882,7 @@ kern_chdir(struct thread *td, const char *path, enum uio_seg pathseg) NDFREE(&nd, NDF_ONLY_PNBUF); return (error); } - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); NDFREE(&nd, NDF_ONLY_PNBUF); pwd_chdir(td, nd.ni_vp); return (0); @@ -918,7 +918,7 @@ sys_chroot(struct thread *td, struct chroot_args *uap) if (error != 0) goto e_vunlock; #endif - VOP_UNLOCK(nd.ni_vp, 0); + VOP_UNLOCK(nd.ni_vp); error = pwd_chroot(td, nd.ni_vp); vrele(nd.ni_vp); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -1120,7 +1120,7 @@ kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, DTYPE_VNODE, vp, &vnops); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (flags & O_TRUNC) { error = fo_truncate(fp, 0, td->td_ucred, td); if (error != 0) @@ -1561,7 +1561,7 @@ kern_linkat_vp(struct thread *td, struct vnode *vp, int fd, const char *path, return (EAGAIN); } error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vput(nd.ni_dvp); vn_finished_write(mp); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -2615,7 +2615,7 @@ setfflags(struct thread *td, struct vnode *vp, u_long flags) if (error == 0) #endif error = VOP_SETATTR(vp, &vattr, td->td_ucred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); return (error); } @@ -2717,7 +2717,7 @@ sys_fchflags(struct thread *td, struct fchflags_args *uap) #ifdef AUDIT vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(fp->f_vnode); - VOP_UNLOCK(fp->f_vnode, 0); + VOP_UNLOCK(fp->f_vnode); #endif error = setfflags(td, fp->f_vnode, uap->flags); fdrop(fp, td); @@ -2744,7 +2744,7 @@ setfmode(struct thread *td, struct ucred *cred, struct vnode *vp, int mode) if (error == 0) #endif error = VOP_SETATTR(vp, &vattr, cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); return (error); } @@ -2871,7 +2871,7 @@ setfown(struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid, if (error == 0) #endif error = VOP_SETATTR(vp, &vattr, cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); return (error); } @@ -3090,7 +3090,7 @@ setutimes(struct thread *td, struct vnode *vp, const struct timespec *ts, #endif if (error == 0) error = VOP_SETATTR(vp, &vattr, td->td_ucred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); return (error); } @@ -3218,7 +3218,7 @@ kern_futimes(struct thread *td, int fd, struct timeval *tptr, #ifdef AUDIT vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(fp->f_vnode); - VOP_UNLOCK(fp->f_vnode, 0); + VOP_UNLOCK(fp->f_vnode); #endif error = setutimes(td, fp->f_vnode, ts, 2, tptr == NULL); fdrop(fp, td); @@ -3252,7 +3252,7 @@ kern_futimens(struct thread *td, int fd, struct timespec *tptr, #ifdef AUDIT vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(fp->f_vnode); - VOP_UNLOCK(fp->f_vnode, 0); + VOP_UNLOCK(fp->f_vnode); #endif error = setutimes(td, fp->f_vnode, ts, 2, flags & UTIMENS_NULL); fdrop(fp, td); @@ -3353,7 +3353,7 @@ kern_truncate(struct thread *td, const char *path, enum uio_seg pathseg, vattr.va_size = length; error = VOP_SETATTR(vp, &vattr, td->td_ucred); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); vn_rangelock_unlock(vp, rl_cookie); vrele(vp); @@ -3429,7 +3429,7 @@ kern_fsync(struct thread *td, int fd, bool fullsync) VM_OBJECT_WUNLOCK(vp->v_object); } error = fullsync ? VOP_FSYNC(vp, MNT_WAIT, td) : VOP_FDATASYNC(vp, td); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); drop: fdrop(fp, td); @@ -3518,9 +3518,9 @@ kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, #ifdef MAC error = mac_vnode_check_rename_from(td->td_ucred, fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd); - VOP_UNLOCK(fromnd.ni_dvp, 0); + VOP_UNLOCK(fromnd.ni_dvp); if (fromnd.ni_dvp != fromnd.ni_vp) - VOP_UNLOCK(fromnd.ni_vp, 0); + VOP_UNLOCK(fromnd.ni_vp); #endif fvp = fromnd.ni_vp; NDINIT_ATRIGHTS(&tond, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE | @@ -4060,7 +4060,7 @@ kern_getdirentries(struct thread *td, int fd, char *buf, size_t count, NULL); foffset = auio.uio_offset; if (error != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); goto fail; } if (count == auio.uio_resid && @@ -4076,7 +4076,7 @@ kern_getdirentries(struct thread *td, int fd, char *buf, size_t count, vput(tvp); goto unionread; } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); *basep = loff; if (residp != NULL) *residp = auio.uio_resid; @@ -4326,7 +4326,7 @@ kern_fhlinkat(struct thread *td, int fd, const char *path, vfs_unbusy(mp); if (error != 0) return (error); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } while ((error = kern_linkat_vp(td, vp, fd, path, pathseg)) == EAGAIN); return (error); } @@ -4439,7 +4439,7 @@ sys_fhopen(struct thread *td, struct fhopen_args *uap) fp->f_seqcount = 1; finit(fp, (fmode & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE, vp, &vnops); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if ((fmode & O_TRUNC) != 0) { error = fo_truncate(fp, 0, td->td_ucred, td); if (error != 0) @@ -4625,7 +4625,7 @@ kern_posix_fallocate(struct thread *td, int fd, off_t offset, off_t len) if (error == 0) #endif error = VOP_ALLOCATE(vp, &offset, &len); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); if (olen + ooffset != offset + len) { diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index af581f0f512..c847a6b3099 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -309,7 +309,7 @@ vn_open_vnode_advlock(struct vnode *vp, int fmode, struct file *fp) return (EOPNOTSUPP); lock_flags = VOP_ISLOCKED(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); lf.l_whence = SEEK_SET; lf.l_start = 0; @@ -455,7 +455,7 @@ vn_close1(struct vnode *vp, int flags, struct ucred *file_cred, } error = VOP_CLOSE(vp, flags, file_cred, td); if (keep_ref) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); else vput(vp); vn_finished_write(mp); @@ -608,7 +608,7 @@ vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, int len, off_t offset, if (auio.uio_resid && error == 0) error = EIO; if ((ioflg & IO_NODELOCKED) == 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (mp != NULL) vn_finished_write(mp); } @@ -811,7 +811,7 @@ vn_read(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, #endif error = VOP_READ(vp, uio, ioflag, fp->f_cred); fp->f_nextoff = uio->uio_offset; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error == 0 && advice == POSIX_FADV_NOREUSE && orig_offset != uio->uio_offset) /* @@ -886,7 +886,7 @@ vn_write(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, #endif error = VOP_WRITE(vp, uio, ioflag, fp->f_cred); fp->f_nextoff = uio->uio_offset; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (vp->v_type != VCHR) vn_finished_write(mp); if (error == 0 && advice == POSIX_FADV_NOREUSE && @@ -1323,7 +1323,7 @@ vn_truncate(struct file *fp, off_t length, struct ucred *active_cred, error = vn_truncate_locked(vp, length, (fp->f_flag & O_FSYNC) != 0, fp->f_cred); out: - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); out1: vn_rangelock_unlock(vp, rl_cookie); @@ -1364,7 +1364,7 @@ vn_statfile(struct file *fp, struct stat *sb, struct ucred *active_cred, vn_lock(vp, LK_SHARED | LK_RETRY); error = vn_stat(vp, sb, active_cred, fp->f_cred, td); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } @@ -1496,7 +1496,7 @@ vn_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, case FIONREAD: vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, active_cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error == 0) *(int *)data = vattr.va_size - fp->f_offset; return (error); @@ -1510,7 +1510,7 @@ vn_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, #endif error = VOP_BMAP(vp, bmarg->bn, NULL, &bmarg->bn, &bmarg->runp, &bmarg->runb); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); case FIONBIO: case FIOASYNC: @@ -1543,7 +1543,7 @@ vn_poll(struct file *fp, int events, struct ucred *active_cred, vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); AUDIT_ARG_VNODE1(vp); error = mac_vnode_check_poll(active_cred, fp->f_cred, vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (!error) #endif @@ -1571,7 +1571,7 @@ _vn_lock(struct vnode *vp, int flags, char *file, int line) if ((flags & LK_RETRY) == 0) { if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = ENOENT; } } else if (error != 0) @@ -1972,7 +1972,7 @@ vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace, td); if ((ioflg & IO_NODELOCKED) == 0) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error == 0) { *buflen = *buflen - auio.uio_resid; @@ -2017,7 +2017,7 @@ vn_extattr_set(struct vnode *vp, int ioflg, int attrnamespace, if ((ioflg & IO_NODELOCKED) == 0) { vn_finished_write(mp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } return (error); @@ -2046,7 +2046,7 @@ vn_extattr_rm(struct vnode *vp, int ioflg, int attrnamespace, if ((ioflg & IO_NODELOCKED) == 0) { vn_finished_write(mp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } return (error); @@ -2083,7 +2083,7 @@ vn_vget_ino_gen(struct vnode *vp, vn_get_ino_t alloc, void *alloc_arg, error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { vfs_ref(mp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = vfs_busy(mp, 0); vn_lock(vp, ltype | LK_RETRY); vfs_rel(mp); @@ -2094,7 +2094,7 @@ vn_vget_ino_gen(struct vnode *vp, vn_get_ino_t alloc, void *alloc_arg, return (ENOENT); } } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = alloc(mp, alloc_arg, lkflags, rvp); vfs_unbusy(mp); if (*rvp != vp) @@ -2138,7 +2138,7 @@ vn_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, #ifdef AUDIT vn_lock(vp, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); #endif return (setfmode(td, active_cred, vp, mode)); } @@ -2153,7 +2153,7 @@ vn_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, #ifdef AUDIT vn_lock(vp, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); #endif return (setfown(td, active_cred, vp, uid, gid)); } @@ -2218,7 +2218,7 @@ vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred) if (cmd == FIOSEEKDATA) error = ENXIO; unlock: - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error == 0) *off = noff; return (error); @@ -2251,7 +2251,7 @@ vn_seek(struct file *fp, off_t offset, int whence, struct thread *td) case L_XTND: vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, cred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error) break; @@ -2385,7 +2385,7 @@ vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif) va.va_rdev = NODEV; vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &va, curthread->td_ucred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error != 0) return (error); if (va.va_fsid != VNOVAL) @@ -2670,7 +2670,7 @@ vn_copy_file_range(struct vnode *invp, off_t *inoffp, struct vnode *outvp, error = VOP_GETATTR(invp, &va, incred); if (error == 0 && va.va_size < *inoffp + len) error = EINVAL; - VOP_UNLOCK(invp, 0); + VOP_UNLOCK(invp); if (error != 0) goto out; @@ -2850,7 +2850,7 @@ vn_write_outvp(struct vnode *outvp, char *dat, off_t outoff, off_t xfer, outoff += xfer2; xfer -= xfer2; } - VOP_UNLOCK(outvp, 0); + VOP_UNLOCK(outvp); } if (mp != NULL) vn_finished_write(mp); @@ -2891,7 +2891,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, goto out; if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0) holein = 0; - VOP_UNLOCK(invp, 0); + VOP_UNLOCK(invp); mp = NULL; error = vn_start_write(outvp, &mp, V_WAIT); @@ -2931,7 +2931,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, if (error == 0) va.va_size = *outoffp; } - VOP_UNLOCK(outvp, 0); + VOP_UNLOCK(outvp); } if (mp != NULL) vn_finished_write(mp); @@ -3054,7 +3054,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, startoff, UIO_SYSSPACE, IO_NODELOCKED, curthread->td_ucred, incred, &aresid, curthread); - VOP_UNLOCK(invp, 0); + VOP_UNLOCK(invp); /* * Linux considers a range that exceeds EOF to * be an error, so we will too. diff --git a/sys/nfs/nfs_lock.c b/sys/nfs/nfs_lock.c index efa1e80b5b7..7be9547aeba 100644 --- a/sys/nfs/nfs_lock.c +++ b/sys/nfs/nfs_lock.c @@ -256,7 +256,7 @@ nfs_dolock(struct vop_advlock_args *ap) nmp->nm_getinfo(vp, msg.lm_fh, &msg.lm_fh_len, &msg.lm_addr, &msg.lm_nfsv3, NULL, NULL); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* * the NLM protocol doesn't allow the server to return an error diff --git a/sys/nlm/nlm_advlock.c b/sys/nlm/nlm_advlock.c index 6a9ce95dcd6..7d213ee14ba 100644 --- a/sys/nlm/nlm_advlock.c +++ b/sys/nlm/nlm_advlock.c @@ -253,7 +253,7 @@ nlm_advlock_internal(struct vnode *vp, void *id, int op, struct flock *fl, td->td_ucred = vp->v_mount->mnt_cred; crhold(td->td_ucred); if (unlock_vp) - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); host = nlm_find_host_by_name(servername, sa, vers); auth = authunix_create(cred); diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c index e66dd724947..9983eef8714 100644 --- a/sys/nlm/nlm_prot_impl.c +++ b/sys/nlm/nlm_prot_impl.c @@ -1797,7 +1797,7 @@ nlm_get_vfs_state(struct nlm_host *host, struct svc_req *rqstp, #if __FreeBSD_version < 800011 VOP_UNLOCK(vs->vs_vp, 0, curthread); #else - VOP_UNLOCK(vs->vs_vp, 0); + VOP_UNLOCK(vs->vs_vp); #endif vs->vs_vnlocked = FALSE; diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index 13fd16f2ea3..f50d7728109 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -690,7 +690,7 @@ audit_arg_file(struct proc *p, struct file *fp) vp = fp->f_vnode; vn_lock(vp, LK_SHARED | LK_RETRY); audit_arg_vnode1(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); break; case DTYPE_SOCKET: @@ -978,6 +978,6 @@ audit_sysclose(struct thread *td, int fd) vp = fp->f_vnode; vn_lock(vp, LK_SHARED | LK_RETRY); audit_arg_vnode1(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); fdrop(fp, td); } diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c index a6680ede392..8548c4e1f74 100644 --- a/sys/security/audit/audit_syscalls.c +++ b/sys/security/audit/audit_syscalls.c @@ -811,13 +811,13 @@ sys_auditctl(struct thread *td, struct auditctl_args *uap) vp = nd.ni_vp; #ifdef MAC error = mac_system_check_auditctl(td->td_ucred, vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); if (error) { vn_close(vp, AUDIT_CLOSE_FLAGS, td->td_ucred, td); return (error); } #else - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); #endif NDFREE(&nd, NDF_ONLY_PNBUF); if (vp->v_type != VREG) { diff --git a/sys/security/audit/audit_worker.c b/sys/security/audit/audit_worker.c index f169ab8d9dd..de9bdfc4b5e 100644 --- a/sys/security/audit/audit_worker.c +++ b/sys/security/audit/audit_worker.c @@ -119,7 +119,7 @@ audit_worker_sync_vp(struct vnode *vp, struct mount *mp, const char *fmt, ...) if (error == 0) { VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY); (void)VOP_FSYNC(vp, MNT_WAIT, curthread); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp1); } vfs_unbusy(mp); @@ -503,7 +503,7 @@ audit_rotate_vnode(struct ucred *cred, struct vnode *vp) vn_lock(vp, LK_SHARED | LK_RETRY); if (VOP_GETATTR(vp, &vattr, cred) != 0) vattr.va_size = 0; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else { vattr.va_size = 0; } diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index cc2389ac343..33e0214b25f 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.c @@ -302,7 +302,7 @@ mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred, vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); result = vme->max_protection; mac_vnode_check_mmap_downgrade(cred, vp, &result); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* * Find out what maximum protection we may be allowing now * but a policy needs to get removed. @@ -337,7 +337,7 @@ mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred, vm_object_page_clean(object, offset, offset + vme->end - vme->start, OBJPC_SYNC); VM_OBJECT_WUNLOCK(object); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); vm_object_deallocate(object); /* diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 20e6770fef7..c28a5e99c65 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -268,7 +268,7 @@ sys___mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap) intlabel = mac_vnode_label_alloc(); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); mac_vnode_copy_label(vp->v_label, intlabel); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = mac_vnode_externalize_label(intlabel, elements, buffer, mac.m_buflen); mac_vnode_label_free(intlabel); @@ -436,7 +436,7 @@ sys___mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap) } vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = vn_setlabel(vp, intlabel, td->td_ucred); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); mac_vnode_label_free(intlabel); break; diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index 8bd610192ca..5867320a201 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -691,7 +691,7 @@ mac_veriexec_syscall(struct thread *td, int call, void *arg) ((va.va_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0), td); check_done: /* Release the lock we obtained earlier */ - VOP_UNLOCK(img.vp, 0); + VOP_UNLOCK(img.vp); cleanup_file: fdrop(fp, td); break; diff --git a/sys/security/mac_veriexec_parser/mac_veriexec_parser.c b/sys/security/mac_veriexec_parser/mac_veriexec_parser.c index d34cb464dfa..dc3b1301f9e 100644 --- a/sys/security/mac_veriexec_parser/mac_veriexec_parser.c +++ b/sys/security/mac_veriexec_parser/mac_veriexec_parser.c @@ -291,7 +291,7 @@ read_manifest(char *path, unsigned char *digest) data[bytes_read] = '\0'; - VOP_UNLOCK(nid.ni_vp, 0); + VOP_UNLOCK(nid.ni_vp); (void)vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); /* @@ -370,7 +370,7 @@ parse_entry(char *entry, char *prefix) mtx_unlock(&ve_mutex); out: - VOP_UNLOCK(nid.ni_vp, 0); + VOP_UNLOCK(nid.ni_vp); vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); return (rc); } diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 9d7a584a978..92d298e8d87 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -3401,7 +3401,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) vput(vp); break; } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); pwd_chdir(td, vp); break; @@ -3628,7 +3628,7 @@ buffered_write(fp, uio, active_cred, flags, td) } error = bwrite(bp); out: - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); foffset_unlock_uio(fp, uio, flags | FOF_NEXTOFF); return (error); } diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index cbc32c940e1..b474bbf0fd5 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -133,7 +133,7 @@ ffs_update(vp, waitfor) * longer necessary and we can just return an error. */ vref(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); pause("ffsupd", 1); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vrele(vp); diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index ab065f2de37..fc2a17ca3b2 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -118,7 +118,7 @@ ffs_rawread_sync(struct vnode *vp) upgraded = 1; else upgraded = 0; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); (void) vn_start_write(vp, &mp, V_WAIT); VOP_LOCK(vp, LK_EXCLUSIVE); } else if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index bc279e27269..9f9f08e7ad7 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -296,7 +296,7 @@ ffs_snapshot(mp, snapfile) goto restart; } error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vat); - VOP_UNLOCK(nd.ni_dvp, 0); + VOP_UNLOCK(nd.ni_dvp); if (error) { NDFREE(&nd, NDF_ONLY_PNBUF); vn_finished_write(wrtmp); @@ -409,7 +409,7 @@ ffs_snapshot(mp, snapfile) */ if ((error = ffs_syncvnode(vp, MNT_WAIT, 0)) != 0) goto out; - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); /* * All allocations are done, so we can now snapshot the system. * @@ -559,7 +559,7 @@ ffs_snapshot(mp, snapfile) if (xvp->v_usecount == 0 && (xvp->v_iflag & (VI_OWEINACT | VI_DOINGINACT)) == 0) { VI_UNLOCK(xvp); - VOP_UNLOCK(xvp, 0); + VOP_UNLOCK(xvp); vdrop(xvp); continue; } @@ -570,13 +570,13 @@ ffs_snapshot(mp, snapfile) #endif if (VOP_GETATTR(xvp, &vat, td->td_ucred) == 0 && vat.va_nlink > 0) { - VOP_UNLOCK(xvp, 0); + VOP_UNLOCK(xvp); vdrop(xvp); continue; } xp = VTOI(xvp); if (ffs_checkfreefile(copy_fs, vp, xp->i_number)) { - VOP_UNLOCK(xvp, 0); + VOP_UNLOCK(xvp); vdrop(xvp); continue; } @@ -607,7 +607,7 @@ ffs_snapshot(mp, snapfile) if (!error) error = ffs_freefile(ump, copy_fs, vp, xp->i_number, xp->i_mode, NULL); - VOP_UNLOCK(xvp, 0); + VOP_UNLOCK(xvp); vdrop(xvp); if (error) { free(copy_fs->fs_csp, M_UFSMNT); @@ -869,7 +869,7 @@ ffs_snapshot(mp, snapfile) if (error) vput(vp); else - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vrele(nd.ni_dvp); vn_finished_write(wrtmp); process_deferred_inactive(mp); @@ -2059,7 +2059,7 @@ ffs_snapshot_mount(mp) TAILQ_INSERT_TAIL(&sn->sn_head, ip, i_nextsnap); vp->v_vflag |= VV_SYSTEM; VI_UNLOCK(devvp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); lastvp = vp; } vp = lastvp; @@ -2085,7 +2085,7 @@ ffs_snapshot_mount(mp) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if ((error = VOP_READ(vp, &auio, IO_UNIT, td->td_ucred)) != 0) { printf("ffs_snapshot_mount: read_1 failed %d\n", error); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return; } snapblklist = malloc(snaplistsize * sizeof(daddr_t), @@ -2097,11 +2097,11 @@ ffs_snapshot_mount(mp) auio.uio_offset -= sizeof(snaplistsize); if ((error = VOP_READ(vp, &auio, IO_UNIT, td->td_ucred)) != 0) { printf("ffs_snapshot_mount: read_2 failed %d\n", error); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); free(snapblklist, M_UFSMNT); return; } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); VI_LOCK(devvp); ASSERT_VOP_LOCKED(devvp, "ffs_snapshot_mount"); sn->sn_listsize = snaplistsize; @@ -2587,7 +2587,7 @@ process_deferred_inactive(struct mount *mp) VI_LOCK(vp); if ((vp->v_iflag & VI_OWEINACT) == 0 || vp->v_usecount > 0) { VI_UNLOCK(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); continue; } @@ -2595,7 +2595,7 @@ process_deferred_inactive(struct mount *mp) VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp, ("process_deferred_inactive: got VI_OWEINACT")); VI_UNLOCK(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); } vn_finished_secondary_write(mp); diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index aa7939c07b5..5356ae051d8 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1925,7 +1925,7 @@ softdep_flushworklist(oldmnt, countp, td) *countp += count; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, MNT_WAIT, td); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); if (error != 0) break; } @@ -1955,7 +1955,7 @@ softdep_waitidle(struct mount *mp, int flags __unused) "softdeps", 10 * hz); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, MNT_WAIT, td); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); ACQUIRE_LOCK(ump); if (error != 0) break; @@ -12511,7 +12511,7 @@ softdep_fsync(vp) error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { vfs_ref(mp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = vfs_busy(mp, 0); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vfs_rel(mp); @@ -12522,7 +12522,7 @@ softdep_fsync(vp) return (ENOENT); } } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = ffs_vgetf(mp, parentino, LK_EXCLUSIVE, &pvp, FFSV_FORCEINSMQ); vfs_unbusy(mp); @@ -13519,7 +13519,7 @@ softdep_request_cleanup_flush(mp, ump) lvp = ump->um_devvp; if (vn_lock(lvp, LK_EXCLUSIVE | LK_NOWAIT) == 0) { VOP_FSYNC(lvp, MNT_NOWAIT, td); - VOP_UNLOCK(lvp, 0); + VOP_UNLOCK(lvp); } return (failed_vnode); } diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c index b8ad1e7696b..0d411431b92 100644 --- a/sys/ufs/ffs/ffs_suspend.c +++ b/sys/ufs/ffs/ffs_suspend.c @@ -199,7 +199,7 @@ ffs_susp_suspend(struct mount *mp) vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_ACCESS(ump->um_devvp, VREAD | VWRITE, curthread->td_ucred, curthread); - VOP_UNLOCK(ump->um_devvp, 0); + VOP_UNLOCK(ump->um_devvp); if (error != 0) return (error); #ifdef MAC diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 0c1c765a5f8..df64d27c98c 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -342,10 +342,10 @@ ffs_mount(struct mount *mp) if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); if (error) { - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); return (error); } - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); fs->fs_flags &= ~FS_UNCLEAN; if (fs->fs_clean == 0) { fs->fs_flags |= FS_UNCLEAN; @@ -650,7 +650,7 @@ ffs_reload(struct mount *mp, struct thread *td, int flags) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); if (vinvalbuf(devvp, 0, 0, 0) != 0) panic("ffs_reload: dirty1"); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); /* * Step 2: re-read superblock from disk. @@ -805,7 +805,7 @@ ffs_mountfs(devvp, mp, td) dev = devvp->v_rdev; if (atomic_cmpset_acq_ptr((uintptr_t *)&dev->si_mountpt, 0, (uintptr_t)mp) == 0) { - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); return (EBUSY); } g_topology_lock(); @@ -813,12 +813,12 @@ ffs_mountfs(devvp, mp, td) g_topology_unlock(); if (error != 0) { atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); return (error); } dev_ref(dev); devvp->v_bufobj.bo_ops = &ffs_ops; - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); if (dev->si_iosize_max != 0) mp->mnt_iosize_max = dev->si_iosize_max; if (mp->mnt_iosize_max > MAXPHYS) @@ -1402,7 +1402,7 @@ ffs_flushfiles(mp, flags, td) */ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(ump->um_devvp, MNT_WAIT, td); - VOP_UNLOCK(ump->um_devvp, 0); + VOP_UNLOCK(ump->um_devvp); return (error); } @@ -1614,7 +1614,7 @@ ffs_sync(mp, waitfor) BO_UNLOCK(bo); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, waitfor, td); - VOP_UNLOCK(devvp, 0); + VOP_UNLOCK(devvp); if (MOUNTEDSOFTDEP(mp) && (error == 0 || error == EAGAIN)) error = ffs_sbupdate(ump, waitfor, 0); if (error != 0) diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index be32bb7cc59..2677d2fa2af 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -271,7 +271,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname, (size_t *) &cnp.cn_namelen); if (error) { if (lockparent == UE_GETDIR_LOCKPARENT_DONT) { - VOP_UNLOCK(start_dvp, 0); + VOP_UNLOCK(start_dvp); } uma_zfree(namei_zone, cnp.cn_pnbuf); printf("ufs_extattr_lookup: copystr failed\n"); @@ -290,7 +290,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname, * if ufs_lookup() didn't. */ if (lockparent == UE_GETDIR_LOCKPARENT_DONT) - VOP_UNLOCK(start_dvp, 0); + VOP_UNLOCK(start_dvp); /* * Check that ufs_lookup() didn't release the lock when we @@ -307,7 +307,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname, */ if (target_vp != start_dvp && lockparent == UE_GETDIR_LOCKPARENT_DONT) - VOP_UNLOCK(start_dvp, 0); + VOP_UNLOCK(start_dvp); if (lockparent == UE_GETDIR_LOCKPARENT) ASSERT_VOP_LOCKED(start_dvp, "ufs_extattr_lookup"); @@ -335,14 +335,14 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp, if (error) { printf("ufs_extattr_enable_with_open.VOP_OPEN(): failed " "with %d\n", error); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } error = VOP_ADD_WRITECOUNT(vp, 1); if (error != 0) { VOP_CLOSE(vp, FREAD | FWRITE, td->td_ucred, td); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, @@ -350,7 +350,7 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp, vref(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); error = ufs_extattr_enable(ump, attrnamespace, attrname, vp, td); if (error != 0) @@ -666,11 +666,11 @@ ufs_extattr_enable(struct ufsmount *ump, int attrnamespace, LIST_INSERT_HEAD(&ump->um_extattr.uepm_list, attribute, uele_entries); - VOP_UNLOCK(backing_vnode, 0); + VOP_UNLOCK(backing_vnode); return (0); unlock_free_exit: - VOP_UNLOCK(backing_vnode, 0); + VOP_UNLOCK(backing_vnode); free_exit: free(attribute, M_UFS_EXTATTR); @@ -698,7 +698,7 @@ ufs_extattr_disable(struct ufsmount *ump, int attrnamespace, vn_lock(uele->uele_backing_vnode, LK_SHARED | LK_RETRY); ASSERT_VOP_LOCKED(uele->uele_backing_vnode, "ufs_extattr_disable"); - VOP_UNLOCK(uele->uele_backing_vnode, 0); + VOP_UNLOCK(uele->uele_backing_vnode); error = vn_close(uele->uele_backing_vnode, FREAD|FWRITE, td->td_ucred, td); @@ -727,7 +727,7 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, error = priv_check(td, PRIV_UFS_EXTATTRCTL); if (error) { if (filename_vp != NULL) - VOP_UNLOCK(filename_vp, 0); + VOP_UNLOCK(filename_vp); return (error); } @@ -737,14 +737,14 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, */ if (ump->um_fstype != UFS1) { if (filename_vp != NULL) - VOP_UNLOCK(filename_vp, 0); + VOP_UNLOCK(filename_vp); return (EOPNOTSUPP); } switch(cmd) { case UFS_EXTATTR_CMD_START: if (filename_vp != NULL) { - VOP_UNLOCK(filename_vp, 0); + VOP_UNLOCK(filename_vp); return (EINVAL); } if (attrname != NULL) @@ -756,7 +756,7 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, case UFS_EXTATTR_CMD_STOP: if (filename_vp != NULL) { - VOP_UNLOCK(filename_vp, 0); + VOP_UNLOCK(filename_vp); return (EINVAL); } if (attrname != NULL) @@ -771,7 +771,7 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, if (filename_vp == NULL) return (EINVAL); if (attrname == NULL) { - VOP_UNLOCK(filename_vp, 0); + VOP_UNLOCK(filename_vp); return (EINVAL); } @@ -789,7 +789,7 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, case UFS_EXTATTR_CMD_DISABLE: if (filename_vp != NULL) { - VOP_UNLOCK(filename_vp, 0); + VOP_UNLOCK(filename_vp); return (EINVAL); } if (attrname == NULL) @@ -974,7 +974,7 @@ ufs_extattr_get(struct vnode *vp, int attrnamespace, const char *name, uio->uio_offset = 0; if (attribute->uele_backing_vnode != vp) - VOP_UNLOCK(attribute->uele_backing_vnode, 0); + VOP_UNLOCK(attribute->uele_backing_vnode); return (error); } @@ -1148,7 +1148,7 @@ ufs_extattr_set(struct vnode *vp, int attrnamespace, const char *name, uio->uio_offset = 0; if (attribute->uele_backing_vnode != vp) - VOP_UNLOCK(attribute->uele_backing_vnode, 0); + VOP_UNLOCK(attribute->uele_backing_vnode); return (error); } @@ -1267,7 +1267,7 @@ ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, error = ENXIO; vopunlock_exit: - VOP_UNLOCK(attribute->uele_backing_vnode, 0); + VOP_UNLOCK(attribute->uele_backing_vnode); return (error); } diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 06c99645f4d..a8b0fa03617 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -968,7 +968,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename) if (isrename) return (0); if (tvp != NULL) - VOP_UNLOCK(tvp, 0); + VOP_UNLOCK(tvp); (void) VOP_FSYNC(dvp, MNT_WAIT, td); if (tvp != NULL) vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); @@ -1129,7 +1129,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename) if (isrename == 0 && error == 0 && dp->i_endoff && dp->i_endoff < dp->i_size) { if (tvp != NULL) - VOP_UNLOCK(tvp, 0); + VOP_UNLOCK(tvp); error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr); if (error != 0) diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 44ce071e5b8..863560fc550 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -535,7 +535,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) } } if (error != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); (void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td); return (error); } @@ -543,7 +543,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) UFS_LOCK(ump); if ((ump->um_qflags[type] & (QTF_OPENING|QTF_CLOSING)) != 0) { UFS_UNLOCK(ump); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); (void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td); vfs_unbusy(mp); return (EALREADY); @@ -551,7 +551,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) ump->um_qflags[type] |= QTF_OPENING|QTF_CLOSING; UFS_UNLOCK(ump); if ((error = dqopen(vp, ump, type)) != 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); UFS_LOCK(ump); ump->um_qflags[type] &= ~(QTF_OPENING|QTF_CLOSING); UFS_UNLOCK(ump); @@ -559,7 +559,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) vfs_unbusy(mp); return (error); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); MNT_ILOCK(mp); mp->mnt_flag |= MNT_QUOTA; MNT_IUNLOCK(mp); @@ -583,7 +583,7 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) vp->v_vflag |= VV_SYSTEM; VN_LOCK_AREC(vp); VN_LOCK_DSHARE(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); *vpp = vp; /* * Save the credential of the process that turned on quotas. @@ -618,12 +618,12 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) goto again; } if (vp->v_type == VNON || vp->v_writecount == 0) { - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vrele(vp); continue; } error = getinoquota(VTOI(vp)); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vrele(vp); if (error) { MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); @@ -688,7 +688,7 @@ quotaoff1(struct thread *td, struct mount *mp, int type) dq = ip->i_dquot[type]; ip->i_dquot[type] = NODQUOT; dqrele(vp, dq); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vrele(vp); } @@ -707,7 +707,7 @@ quotaoff1(struct thread *td, struct mount *mp, int type) vn_lock(qvp, LK_EXCLUSIVE | LK_RETRY); qvp->v_vflag &= ~VV_SYSTEM; - VOP_UNLOCK(qvp, 0); + VOP_UNLOCK(qvp); error = vn_close(qvp, FREAD|FWRITE, td->td_ucred, td); crfree(cr); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 8e378c8b0da..5b98af730d8 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -913,7 +913,7 @@ ufs_remove(ap) * while holding the snapshot vnode locked, assuming * that the directory hasn't been unlinked too. */ - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); (void) VOP_FSYNC(dvp, MNT_WAIT, td); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); } @@ -1118,9 +1118,9 @@ ufs_rename(ap) #endif endoff = 0; mp = tdvp->v_mount; - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); if (tvp && tvp != tdvp) - VOP_UNLOCK(tvp, 0); + VOP_UNLOCK(tvp); /* * Check for cross-device rename. */ @@ -1146,11 +1146,11 @@ ufs_rename(ap) if (error) goto releout; if (vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { - VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fdvp); error = vn_lock(tdvp, LK_EXCLUSIVE); if (error) goto releout; - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(tdvp); atomic_add_int(&rename_restarts, 1); goto relock; } @@ -1160,20 +1160,20 @@ ufs_rename(ap) */ error = ufs_lookup_ino(fdvp, NULL, fcnp, &ino); if (error) { - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); goto releout; } error = VFS_VGET(mp, ino, LK_EXCLUSIVE | LK_NOWAIT, &nvp); if (error) { - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); if (error != EBUSY) goto releout; error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); if (error != 0) goto releout; - VOP_UNLOCK(nvp, 0); + VOP_UNLOCK(nvp); vrele(fvp); fvp = nvp; atomic_add_int(&rename_restarts, 1); @@ -1186,9 +1186,9 @@ ufs_rename(ap) */ error = ufs_lookup_ino(tdvp, NULL, tcnp, &ino); if (error != 0 && error != EJUSTRETURN) { - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(tdvp, 0); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); + VOP_UNLOCK(fvp); goto releout; } /* @@ -1209,9 +1209,9 @@ ufs_rename(ap) vrele(tvp); tvp = nvp; if (error) { - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(tdvp, 0); - VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(tdvp); + VOP_UNLOCK(fvp); if (error != EBUSY) goto releout; error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); @@ -1294,11 +1294,11 @@ ufs_rename(ap) * everything else and VGET before restarting. */ if (ino) { - VOP_UNLOCK(fdvp, 0); - VOP_UNLOCK(fvp, 0); - VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fdvp); + VOP_UNLOCK(fvp); + VOP_UNLOCK(tdvp); if (tvp) - VOP_UNLOCK(tvp, 0); + VOP_UNLOCK(tvp); error = VFS_VGET(mp, ino, LK_SHARED, &nvp); if (error == 0) vput(nvp); @@ -2710,7 +2710,7 @@ ufs_ioctl(struct vop_ioctl_args *ap) error = vn_lock(vp, LK_SHARED); if (error == 0) { error = ufs_bmap_seekdata(vp, (off_t *)ap->a_data); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); } else error = EBADF; return (error); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index fa05627b55c..9a239252de2 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2398,7 +2398,7 @@ swapoff_one(struct swdevt *sp, struct ucred *cred) #ifdef MAC (void) vn_lock(sp->sw_vp, LK_EXCLUSIVE | LK_RETRY); error = mac_system_check_swapoff(cred, sp->sw_vp); - (void) VOP_UNLOCK(sp->sw_vp, 0); + (void) VOP_UNLOCK(sp->sw_vp); if (error != 0) return (error); #endif @@ -2880,7 +2880,7 @@ swapongeom(struct vnode *vp) error = swapongeom_locked(vp->v_rdev, vp); g_topology_unlock(); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); return (error); } @@ -2946,7 +2946,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) if (error == 0) #endif error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL); - (void) VOP_UNLOCK(vp, 0); + (void) VOP_UNLOCK(vp); if (error) return (error); diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 8ca19f8b229..3dc84a545fc 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -555,7 +555,7 @@ vm_map_entry_set_vnode_text(vm_map_entry_t entry, bool add) VM_OBJECT_RUNLOCK(object); vn_lock(vp, LK_SHARED | LK_RETRY); VOP_UNSET_TEXT_CHECKED(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); } } else { diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 20e3a562af9..aef3a2b9eae 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -541,13 +541,13 @@ vm_object_deallocate(vm_object_t object) if (object->type == OBJT_DEAD || object->ref_count != 1) { VM_OBJECT_WUNLOCK(object); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); return; } if ((object->flags & OBJ_TMPFS) != 0) VOP_UNSET_TEXT(vp); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); } if (object->shadow_count == 0 && @@ -1032,7 +1032,7 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size, VM_OBJECT_WUNLOCK(object); if (fsync_after) error = VOP_FSYNC(vp, MNT_WAIT, curthread); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vn_finished_write(mp); if (error != 0) res = FALSE; diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index ed286e0024c..00177304b76 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -153,7 +153,7 @@ vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) VM_OBJECT_WUNLOCK(object); return (0); } - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vm_object_set_flag(object, OBJ_DISCONNECTWNT); VM_OBJECT_SLEEP(object, object, PDROP | PVM, "vodead", 0); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); @@ -1598,7 +1598,7 @@ vnode_pager_release_writecount(vm_object_t object, vm_offset_t start, * vnode's v_writecount is decremented. */ vnode_pager_update_writecount(object, end, start); - VOP_UNLOCK(vp, 0); + VOP_UNLOCK(vp); vdrop(vp); if (mp != NULL) vn_finished_write(mp);