Module Name: src Committed By: riastradh Date: Mon Apr 20 23:03:09 UTC 2015
Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c src/lib/libp2k: p2k.c src/sys/coda: coda_vnops.c src/sys/fs/adosfs: advnops.c src/sys/fs/cd9660: cd9660_vnops.c src/sys/fs/filecorefs: filecore_vnops.c src/sys/fs/nilfs: nilfs_vnops.c src/sys/fs/puffs: puffs_vnops.c src/sys/fs/tmpfs: TODO tmpfs_vnops.c src/sys/fs/udf: udf_vnops.c src/sys/fs/union: union_vnops.c src/sys/fs/unionfs: unionfs_vnops.c src/sys/fs/v7fs: v7fs_vnops.c src/sys/kern: vfs_syscalls.c vnode_if.c src/sys/miscfs/deadfs: dead_vnops.c src/sys/miscfs/fdesc: fdesc_vnops.c src/sys/miscfs/kernfs: kernfs_vnops.c src/sys/miscfs/procfs: procfs_vnops.c src/sys/nfs: nfs_serv.c nfs_vnops.c src/sys/rump/include/rump: rumpvnode_if.h src/sys/rump/librump/rumpvfs: rumpvnode_if.c src/sys/sys: vnode_if.h src/sys/ufs/chfs: chfs_vnops.c src/sys/ufs/ext2fs: ext2fs_vnops.c src/sys/ufs/lfs: lfs_vnops.c ulfs_vnops.c src/sys/ufs/ufs: ufs_vnops.c Log Message: Make VOP_LINK return directory still locked and referenced. Ride 7.99.10 bump. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c cvs rdiff -u -r1.65 -r1.66 src/lib/libp2k/p2k.c cvs rdiff -u -r1.101 -r1.102 src/sys/coda/coda_vnops.c cvs rdiff -u -r1.46 -r1.47 src/sys/fs/adosfs/advnops.c cvs rdiff -u -r1.51 -r1.52 src/sys/fs/cd9660/cd9660_vnops.c cvs rdiff -u -r1.43 -r1.44 src/sys/fs/filecorefs/filecore_vnops.c cvs rdiff -u -r1.31 -r1.32 src/sys/fs/nilfs/nilfs_vnops.c cvs rdiff -u -r1.202 -r1.203 src/sys/fs/puffs/puffs_vnops.c cvs rdiff -u -r1.7 -r1.8 src/sys/fs/tmpfs/TODO cvs rdiff -u -r1.121 -r1.122 src/sys/fs/tmpfs/tmpfs_vnops.c cvs rdiff -u -r1.100 -r1.101 src/sys/fs/udf/udf_vnops.c cvs rdiff -u -r1.62 -r1.63 src/sys/fs/union/union_vnops.c cvs rdiff -u -r1.8 -r1.9 src/sys/fs/unionfs/unionfs_vnops.c cvs rdiff -u -r1.20 -r1.21 src/sys/fs/v7fs/v7fs_vnops.c cvs rdiff -u -r1.495 -r1.496 src/sys/kern/vfs_syscalls.c cvs rdiff -u -r1.93 -r1.94 src/sys/kern/vnode_if.c cvs rdiff -u -r1.57 -r1.58 src/sys/miscfs/deadfs/dead_vnops.c cvs rdiff -u -r1.125 -r1.126 src/sys/miscfs/fdesc/fdesc_vnops.c cvs rdiff -u -r1.154 -r1.155 src/sys/miscfs/kernfs/kernfs_vnops.c cvs rdiff -u -r1.192 -r1.193 src/sys/miscfs/procfs/procfs_vnops.c cvs rdiff -u -r1.170 -r1.171 src/sys/nfs/nfs_serv.c cvs rdiff -u -r1.306 -r1.307 src/sys/nfs/nfs_vnops.c cvs rdiff -u -r1.17 -r1.18 src/sys/rump/include/rump/rumpvnode_if.h cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpvfs/rumpvnode_if.c cvs rdiff -u -r1.88 -r1.89 src/sys/sys/vnode_if.h cvs rdiff -u -r1.27 -r1.28 src/sys/ufs/chfs/chfs_vnops.c cvs rdiff -u -r1.116 -r1.117 src/sys/ufs/ext2fs/ext2fs_vnops.c cvs rdiff -u -r1.270 -r1.271 src/sys/ufs/lfs/lfs_vnops.c cvs rdiff -u -r1.24 -r1.25 src/sys/ufs/lfs/ulfs_vnops.c cvs rdiff -u -r1.229 -r1.230 src/sys/ufs/ufs/ufs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.22 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.23 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.22 Fri Apr 10 19:59:10 2015 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Mon Apr 20 23:03:07 2015 @@ -5510,7 +5510,7 @@ zfs_netbsd_readlink(void *v) static int zfs_netbsd_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -5526,16 +5526,8 @@ zfs_netbsd_link(void *v) KASSERT(cnp->cn_nameptr != NULL); KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE); - error = zfs_link(dvp, vp, __UNCONST(cnp->cn_nameptr), cnp->cn_cred, - NULL, 0); - - /* - * Unlock and release dvp because the VOP_LINK protocol is insane. - */ - VOP_UNLOCK(dvp); - VN_RELE(dvp); - - return (error); + return (zfs_link(dvp, vp, __UNCONST(cnp->cn_nameptr), cnp->cn_cred, + NULL, 0)); } static int Index: src/lib/libp2k/p2k.c diff -u src/lib/libp2k/p2k.c:1.65 src/lib/libp2k/p2k.c:1.66 --- src/lib/libp2k/p2k.c:1.65 Mon Apr 20 21:48:47 2015 +++ src/lib/libp2k/p2k.c Mon Apr 20 23:03:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: p2k.c,v 1.65 2015/04/20 21:48:47 riastradh Exp $ */ +/* $NetBSD: p2k.c,v 1.66 2015/04/20 23:03:07 riastradh Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. @@ -1054,6 +1054,8 @@ p2k_node_link(struct puffs_usermount *pu RUMP_VOP_LOCK(dvp, LK_EXCLUSIVE); rump_pub_vp_incref(dvp); rv = RUMP_VOP_LINK(dvp, OPC2VP(targ), cn); + rump_pub_vp_rele(dvp); + RUMP_VOP_UNLOCK(dvp); freecn(cn); return rv; Index: src/sys/coda/coda_vnops.c diff -u src/sys/coda/coda_vnops.c:1.101 src/sys/coda/coda_vnops.c:1.102 --- src/sys/coda/coda_vnops.c:1.101 Sat Dec 13 15:59:30 2014 +++ src/sys/coda/coda_vnops.c Mon Apr 20 23:03:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: coda_vnops.c,v 1.101 2014/12/13 15:59:30 hannken Exp $ */ +/* $NetBSD: coda_vnops.c,v 1.102 2015/04/20 23:03:07 riastradh Exp $ */ /* * @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.101 2014/12/13 15:59:30 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.102 2015/04/20 23:03:07 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1147,7 +1147,7 @@ int coda_link(void *v) { /* true args */ - struct vop_link_args *ap = v; + struct vop_link_v2_args *ap = v; vnode_t *vp = ap->a_vp; struct cnode *cp = VTOC(vp); vnode_t *dvp = ap->a_dvp; @@ -1208,7 +1208,6 @@ coda_link(void *v) CODADEBUG(CODA_LINK, myprintf(("in link result %d\n",error)); ) exit: - vput(dvp); return(error); } Index: src/sys/fs/adosfs/advnops.c diff -u src/sys/fs/adosfs/advnops.c:1.46 src/sys/fs/adosfs/advnops.c:1.47 --- src/sys/fs/adosfs/advnops.c:1.46 Sat Mar 28 19:24:05 2015 +++ src/sys/fs/adosfs/advnops.c Mon Apr 20 23:03:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: advnops.c,v 1.46 2015/03/28 19:24:05 maxv Exp $ */ +/* $NetBSD: advnops.c,v 1.47 2015/04/20 23:03:07 riastradh Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.46 2015/03/28 19:24:05 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.47 2015/04/20 23:03:07 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -409,14 +409,13 @@ reterr: int adosfs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; VOP_ABORTOP(ap->a_dvp, ap->a_cnp); - vput(ap->a_dvp); return (EROFS); } Index: src/sys/fs/cd9660/cd9660_vnops.c diff -u src/sys/fs/cd9660/cd9660_vnops.c:1.51 src/sys/fs/cd9660/cd9660_vnops.c:1.52 --- src/sys/fs/cd9660/cd9660_vnops.c:1.51 Sat Mar 28 19:24:05 2015 +++ src/sys/fs/cd9660/cd9660_vnops.c Mon Apr 20 23:03:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vnops.c,v 1.51 2015/03/28 19:24:05 maxv Exp $ */ +/* $NetBSD: cd9660_vnops.c,v 1.52 2015/04/20 23:03:07 riastradh Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.51 2015/03/28 19:24:05 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.52 2015/04/20 23:03:07 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -664,14 +664,13 @@ cd9660_readlink(void *v) int cd9660_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; VOP_ABORTOP(ap->a_dvp, ap->a_cnp); - vput(ap->a_dvp); return (EROFS); } Index: src/sys/fs/filecorefs/filecore_vnops.c diff -u src/sys/fs/filecorefs/filecore_vnops.c:1.43 src/sys/fs/filecorefs/filecore_vnops.c:1.44 --- src/sys/fs/filecorefs/filecore_vnops.c:1.43 Sat Mar 28 19:24:05 2015 +++ src/sys/fs/filecorefs/filecore_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: filecore_vnops.c,v 1.43 2015/03/28 19:24:05 maxv Exp $ */ +/* $NetBSD: filecore_vnops.c,v 1.44 2015/04/20 23:03:08 riastradh Exp $ */ /*- * Copyright (c) 1994 The Regents of the University of California. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: filecore_vnops.c,v 1.43 2015/03/28 19:24:05 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: filecore_vnops.c,v 1.44 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -419,14 +419,13 @@ filecore_readlink(void *v) int filecore_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; VOP_ABORTOP(ap->a_dvp, ap->a_cnp); - vput(ap->a_dvp); return (EROFS); } Index: src/sys/fs/nilfs/nilfs_vnops.c diff -u src/sys/fs/nilfs/nilfs_vnops.c:1.31 src/sys/fs/nilfs/nilfs_vnops.c:1.32 --- src/sys/fs/nilfs/nilfs_vnops.c:1.31 Sun Mar 29 14:12:28 2015 +++ src/sys/fs/nilfs/nilfs_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_vnops.c,v 1.31 2015/03/29 14:12:28 riastradh Exp $ */ +/* $NetBSD: nilfs_vnops.c,v 1.32 2015/04/20 23:03:08 riastradh Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.31 2015/03/29 14:12:28 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.32 2015/04/20 23:03:08 riastradh Exp $"); #endif /* not lint */ @@ -1189,7 +1189,7 @@ nilfs_do_link(struct vnode *dvp, struct int nilfs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -1205,7 +1205,6 @@ nilfs_link(void *v) VN_KNOTE(vp, NOTE_LINK); VN_KNOTE(dvp, NOTE_WRITE); - vput(dvp); return error; } Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.202 src/sys/fs/puffs/puffs_vnops.c:1.203 --- src/sys/fs/puffs/puffs_vnops.c:1.202 Wed Feb 25 23:14:59 2015 +++ src/sys/fs/puffs/puffs_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.202 2015/02/25 23:14:59 christos Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.203 2015/04/20 23:03:08 riastradh Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.202 2015/02/25 23:14:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.203 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -2017,7 +2017,7 @@ puffs_vnop_rmdir(void *v) int puffs_vnop_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { const struct vnodeop_desc *a_desc; struct vnode *a_dvp; struct vnode *a_vp; @@ -2040,8 +2040,6 @@ puffs_vnop_link(void *v) PUFFS_VN_LINK, VPTOPNC(dvp)); puffs_msg_enqueue(pmp, park_link); - REFPN_AND_UNLOCKVP(dvp, dpn); - REFPN(pn); error = puffs_msg_wait2(pmp, park_link, dpn, pn); PUFFS_MSG_RELEASE(link); @@ -2058,9 +2056,6 @@ puffs_vnop_link(void *v) PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0); } - RELEPN_AND_VP(dvp, dpn); - puffs_releasenode(pn); - return error; } Index: src/sys/fs/tmpfs/TODO diff -u src/sys/fs/tmpfs/TODO:1.7 src/sys/fs/tmpfs/TODO:1.8 --- src/sys/fs/tmpfs/TODO:1.7 Tue Jun 22 18:32:07 2010 +++ src/sys/fs/tmpfs/TODO Mon Apr 20 23:03:08 2015 @@ -5,7 +5,7 @@ - Adjust code style - remove the /* ---- */ markers and use standard struct vop_*_args assignment into *ap with comment like: - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; Index: src/sys/fs/tmpfs/tmpfs_vnops.c diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.121 src/sys/fs/tmpfs/tmpfs_vnops.c:1.122 --- src/sys/fs/tmpfs/tmpfs_vnops.c:1.121 Mon Sep 8 14:49:46 2014 +++ src/sys/fs/tmpfs/tmpfs_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vnops.c,v 1.121 2014/09/08 14:49:46 gson Exp $ */ +/* $NetBSD: tmpfs_vnops.c,v 1.122 2015/04/20 23:03:08 riastradh Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.121 2014/09/08 14:49:46 gson Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.122 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/dirent.h> @@ -744,7 +744,7 @@ out: int tmpfs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -801,7 +801,6 @@ tmpfs_link(void *v) error = 0; out: VOP_UNLOCK(vp); - vput(dvp); return error; } Index: src/sys/fs/udf/udf_vnops.c diff -u src/sys/fs/udf/udf_vnops.c:1.100 src/sys/fs/udf/udf_vnops.c:1.101 --- src/sys/fs/udf/udf_vnops.c:1.100 Mon Apr 6 08:39:23 2015 +++ src/sys/fs/udf/udf_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_vnops.c,v 1.100 2015/04/06 08:39:23 hannken Exp $ */ +/* $NetBSD: udf_vnops.c,v 1.101 2015/04/20 23:03:08 riastradh Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.100 2015/04/06 08:39:23 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_vnops.c,v 1.101 2015/04/20 23:03:08 riastradh Exp $"); #endif /* not lint */ @@ -1593,7 +1593,7 @@ udf_do_link(struct vnode *dvp, struct vn int udf_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -1609,7 +1609,6 @@ udf_link(void *v) VN_KNOTE(vp, NOTE_LINK); VN_KNOTE(dvp, NOTE_WRITE); - vput(dvp); return error; } Index: src/sys/fs/union/union_vnops.c diff -u src/sys/fs/union/union_vnops.c:1.62 src/sys/fs/union/union_vnops.c:1.63 --- src/sys/fs/union/union_vnops.c:1.62 Fri Jul 25 08:20:52 2014 +++ src/sys/fs/union/union_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: union_vnops.c,v 1.62 2014/07/25 08:20:52 dholland Exp $ */ +/* $NetBSD: union_vnops.c,v 1.63 2015/04/20 23:03:08 riastradh Exp $ */ /* * Copyright (c) 1992, 1993, 1994, 1995 @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.62 2014/07/25 08:20:52 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.63 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1176,7 +1176,7 @@ union_remove(void *v) int union_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -1233,7 +1233,6 @@ union_link(void *v) */ error = EEXIST; VOP_UNLOCK(ap->a_vp); - vput(ap->a_dvp); vput(vp); return (error); } @@ -1247,20 +1246,10 @@ union_link(void *v) if (dvp == NULLVP) error = EROFS; - if (error) { - vput(ap->a_dvp); + if (error) return (error); - } - /* - * Account for VOP_LINK to vrele dvp. - * Note: VOP_LINK will unlock dvp. - */ - vref(dvp); - error = VOP_LINK(dvp, vp, cnp); - vrele(ap->a_dvp); - - return error; + return VOP_LINK(dvp, vp, cnp); } int Index: src/sys/fs/unionfs/unionfs_vnops.c diff -u src/sys/fs/unionfs/unionfs_vnops.c:1.8 src/sys/fs/unionfs/unionfs_vnops.c:1.9 --- src/sys/fs/unionfs/unionfs_vnops.c:1.8 Fri Jul 25 08:20:52 2014 +++ src/sys/fs/unionfs/unionfs_vnops.c Mon Apr 20 23:03:08 2015 @@ -897,7 +897,7 @@ static int unionfs_link(void *v) { #if 0 - struct vop_link_args *ap = v; + struct vop_link_v2_args *ap = v; int error; int needrelookup; struct unionfs_node *dunp; Index: src/sys/fs/v7fs/v7fs_vnops.c diff -u src/sys/fs/v7fs/v7fs_vnops.c:1.20 src/sys/fs/v7fs/v7fs_vnops.c:1.21 --- src/sys/fs/v7fs/v7fs_vnops.c:1.20 Mon Dec 29 15:29:38 2014 +++ src/sys/fs/v7fs/v7fs_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: v7fs_vnops.c,v 1.20 2014/12/29 15:29:38 hannken Exp $ */ +/* $NetBSD: v7fs_vnops.c,v 1.21 2015/04/20 23:03:08 riastradh Exp $ */ /*- * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: v7fs_vnops.c,v 1.20 2014/12/29 15:29:38 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: v7fs_vnops.c,v 1.21 2015/04/20 23:03:08 riastradh Exp $"); #if defined _KERNEL_OPT #include "opt_v7fs.h" #endif @@ -722,7 +722,7 @@ out: int v7fs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -750,8 +750,6 @@ v7fs_link(void *v) VOP_UNLOCK(vp); unlock: - vput(dvp); - return error; } Index: src/sys/kern/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.495 src/sys/kern/vfs_syscalls.c:1.496 --- src/sys/kern/vfs_syscalls.c:1.495 Thu Apr 9 05:08:15 2015 +++ src/sys/kern/vfs_syscalls.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.495 2015/04/09 05:08:15 riastradh Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.496 2015/04/20 23:03:08 riastradh Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.495 2015/04/09 05:08:15 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.496 2015/04/20 23:03:08 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_fileassoc.h" @@ -2407,6 +2407,8 @@ do_sys_linkat(struct lwp *l, int fdpath, goto abortop; } error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); + VOP_UNLOCK(nd.ni_dvp); + vrele(nd.ni_dvp); out2: pathbuf_destroy(linkpb); out1: Index: src/sys/kern/vnode_if.c diff -u src/sys/kern/vnode_if.c:1.93 src/sys/kern/vnode_if.c:1.94 --- src/sys/kern/vnode_if.c:1.93 Fri Jul 25 08:18:50 2014 +++ src/sys/kern/vnode_if.c Mon Apr 20 23:03:08 2015 @@ -1,11 +1,11 @@ -/* $NetBSD: vnode_if.c,v 1.93 2014/07/25 08:18:50 dholland Exp $ */ +/* $NetBSD: vnode_if.c,v 1.94 2015/04/20 23:03:08 riastradh Exp $ */ /* * Warning: DO NOT EDIT! This file is automatically generated! * (Modifications made here may easily be lost!) * * Created from the file: - * NetBSD: vnode_if.src,v 1.67 2014/07/25 08:16:47 dholland Exp + * NetBSD: vnode_if.src,v 1.68 2015/04/20 22:59:19 riastradh Exp * by the script: * NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp */ @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.93 2014/07/25 08:18:50 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.94 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/mount.h> @@ -794,18 +794,18 @@ VOP_REMOVE(struct vnode *dvp, } const int vop_link_vp_offsets[] = { - VOPARG_OFFSETOF(struct vop_link_args,a_dvp), - VOPARG_OFFSETOF(struct vop_link_args,a_vp), + VOPARG_OFFSETOF(struct vop_link_v2_args,a_dvp), + VOPARG_OFFSETOF(struct vop_link_v2_args,a_vp), VDESC_NO_OFFSET }; const struct vnodeop_desc vop_link_desc = { VOP_LINK_DESCOFFSET, "vop_link", - 0 | VDESC_VP0_WILLPUT, + 0, vop_link_vp_offsets, VDESC_NO_OFFSET, VDESC_NO_OFFSET, - VOPARG_OFFSETOF(struct vop_link_args, a_cnp), + VOPARG_OFFSETOF(struct vop_link_v2_args, a_cnp), }; int VOP_LINK(struct vnode *dvp, @@ -814,7 +814,7 @@ VOP_LINK(struct vnode *dvp, { int error; bool mpsafe; - struct vop_link_args a; + struct vop_link_v2_args a; a.a_desc = VDESC(vop_link); a.a_dvp = dvp; a.a_vp = vp; Index: src/sys/miscfs/deadfs/dead_vnops.c diff -u src/sys/miscfs/deadfs/dead_vnops.c:1.57 src/sys/miscfs/deadfs/dead_vnops.c:1.58 --- src/sys/miscfs/deadfs/dead_vnops.c:1.57 Fri Jul 25 08:20:52 2014 +++ src/sys/miscfs/deadfs/dead_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dead_vnops.c,v 1.57 2014/07/25 08:20:52 dholland Exp $ */ +/* $NetBSD: dead_vnops.c,v 1.58 2015/04/20 23:03:08 riastradh Exp $ */ /* * Copyright (c) 1989, 1993 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dead_vnops.c,v 1.57 2014/07/25 08:20:52 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dead_vnops.c,v 1.58 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -245,13 +245,13 @@ dead_remove(void *v) int dead_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; - vput(ap->a_dvp); + (void)ap; return EIO; } Index: src/sys/miscfs/fdesc/fdesc_vnops.c diff -u src/sys/miscfs/fdesc/fdesc_vnops.c:1.125 src/sys/miscfs/fdesc/fdesc_vnops.c:1.126 --- src/sys/miscfs/fdesc/fdesc_vnops.c:1.125 Fri Sep 5 10:43:26 2014 +++ src/sys/miscfs/fdesc/fdesc_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fdesc_vnops.c,v 1.125 2014/09/05 10:43:26 christos Exp $ */ +/* $NetBSD: fdesc_vnops.c,v 1.126 2015/04/20 23:03:08 riastradh Exp $ */ /* * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.125 2014/09/05 10:43:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.126 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -922,14 +922,13 @@ fdesc_print(void *v) int fdesc_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; VOP_ABORTOP(ap->a_dvp, ap->a_cnp); - vput(ap->a_dvp); return (EROFS); } Index: src/sys/miscfs/kernfs/kernfs_vnops.c diff -u src/sys/miscfs/kernfs/kernfs_vnops.c:1.154 src/sys/miscfs/kernfs/kernfs_vnops.c:1.155 --- src/sys/miscfs/kernfs/kernfs_vnops.c:1.154 Fri Jul 25 08:20:52 2014 +++ src/sys/miscfs/kernfs/kernfs_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kernfs_vnops.c,v 1.154 2014/07/25 08:20:52 dholland Exp $ */ +/* $NetBSD: kernfs_vnops.c,v 1.155 2015/04/20 23:03:08 riastradh Exp $ */ /* * Copyright (c) 1992, 1993 @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.154 2014/07/25 08:20:52 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.155 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1146,14 +1146,13 @@ kernfs_print(void *v) int kernfs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; VOP_ABORTOP(ap->a_dvp, ap->a_cnp); - vput(ap->a_dvp); return (EROFS); } Index: src/sys/miscfs/procfs/procfs_vnops.c diff -u src/sys/miscfs/procfs/procfs_vnops.c:1.192 src/sys/miscfs/procfs/procfs_vnops.c:1.193 --- src/sys/miscfs/procfs/procfs_vnops.c:1.192 Fri Sep 5 09:26:16 2014 +++ src/sys/miscfs/procfs/procfs_vnops.c Mon Apr 20 23:03:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_vnops.c,v 1.192 2014/09/05 09:26:16 matt Exp $ */ +/* $NetBSD: procfs_vnops.c,v 1.193 2015/04/20 23:03:08 riastradh Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -105,7 +105,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.192 2014/09/05 09:26:16 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.193 2015/04/20 23:03:08 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -516,14 +516,13 @@ procfs_print(void *v) int procfs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; VOP_ABORTOP(ap->a_dvp, ap->a_cnp); - vput(ap->a_dvp); return (EROFS); } Index: src/sys/nfs/nfs_serv.c diff -u src/sys/nfs/nfs_serv.c:1.170 src/sys/nfs/nfs_serv.c:1.171 --- src/sys/nfs/nfs_serv.c:1.170 Thu Jan 23 10:13:57 2014 +++ src/sys/nfs/nfs_serv.c Mon Apr 20 23:03:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_serv.c,v 1.170 2014/01/23 10:13:57 hannken Exp $ */ +/* $NetBSD: nfs_serv.c,v 1.171 2015/04/20 23:03:09 riastradh Exp $ */ /* * Copyright (c) 1989, 1993 @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.170 2014/01/23 10:13:57 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.171 2015/04/20 23:03:09 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -2222,6 +2222,9 @@ out: nqsrv_getl(vp, ND_WRITE); nqsrv_getl(xp, ND_WRITE); error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); + if (nd.ni_dvp != nd.ni_vp) + VOP_UNLOCK(nd.ni_dvp); + vrele(nd.ni_dvp); } else { VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); if (nd.ni_dvp == nd.ni_vp) Index: src/sys/nfs/nfs_vnops.c diff -u src/sys/nfs/nfs_vnops.c:1.306 src/sys/nfs/nfs_vnops.c:1.307 --- src/sys/nfs/nfs_vnops.c:1.306 Fri Jul 25 08:20:53 2014 +++ src/sys/nfs/nfs_vnops.c Mon Apr 20 23:03:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_vnops.c,v 1.306 2014/07/25 08:20:53 dholland Exp $ */ +/* $NetBSD: nfs_vnops.c,v 1.307 2015/04/20 23:03:09 riastradh Exp $ */ /* * Copyright (c) 1989, 1993 @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.306 2014/07/25 08:20:53 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.307 2015/04/20 23:03:09 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -2050,7 +2050,7 @@ nfs_linkrpc(struct vnode *dvp, struct vn int nfs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -2063,7 +2063,6 @@ nfs_link(void *v) error = vn_lock(vp, LK_EXCLUSIVE); if (error != 0) { VOP_ABORTOP(dvp, cnp); - vput(dvp); return error; } @@ -2083,7 +2082,6 @@ nfs_link(void *v) VOP_UNLOCK(vp); VN_KNOTE(vp, NOTE_LINK); VN_KNOTE(dvp, NOTE_WRITE); - vput(dvp); return (error); } Index: src/sys/rump/include/rump/rumpvnode_if.h diff -u src/sys/rump/include/rump/rumpvnode_if.h:1.17 src/sys/rump/include/rump/rumpvnode_if.h:1.18 --- src/sys/rump/include/rump/rumpvnode_if.h:1.17 Fri Jul 25 08:18:50 2014 +++ src/sys/rump/include/rump/rumpvnode_if.h Mon Apr 20 23:03:09 2015 @@ -1,11 +1,11 @@ -/* $NetBSD: rumpvnode_if.h,v 1.17 2014/07/25 08:18:50 dholland Exp $ */ +/* $NetBSD: rumpvnode_if.h,v 1.18 2015/04/20 23:03:09 riastradh Exp $ */ /* * Warning: DO NOT EDIT! This file is automatically generated! * (Modifications made here may easily be lost!) * * Created from the file: - * NetBSD: vnode_if.src,v 1.67 2014/07/25 08:16:47 dholland Exp + * NetBSD: vnode_if.src,v 1.68 2015/04/20 22:59:19 riastradh Exp * by the script: * NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp */ Index: src/sys/rump/librump/rumpvfs/rumpvnode_if.c diff -u src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.16 src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.17 --- src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.16 Fri Jul 25 08:18:50 2014 +++ src/sys/rump/librump/rumpvfs/rumpvnode_if.c Mon Apr 20 23:03:09 2015 @@ -1,11 +1,11 @@ -/* $NetBSD: rumpvnode_if.c,v 1.16 2014/07/25 08:18:50 dholland Exp $ */ +/* $NetBSD: rumpvnode_if.c,v 1.17 2015/04/20 23:03:09 riastradh Exp $ */ /* * Warning: DO NOT EDIT! This file is automatically generated! * (Modifications made here may easily be lost!) * * Created from the file: - * NetBSD: vnode_if.src,v 1.67 2014/07/25 08:16:47 dholland Exp + * NetBSD: vnode_if.src,v 1.68 2015/04/20 22:59:19 riastradh Exp * by the script: * NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp */ @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.16 2014/07/25 08:18:50 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.17 2015/04/20 23:03:09 riastradh Exp $"); #include <sys/param.h> #include <sys/mount.h> Index: src/sys/sys/vnode_if.h diff -u src/sys/sys/vnode_if.h:1.88 src/sys/sys/vnode_if.h:1.89 --- src/sys/sys/vnode_if.h:1.88 Fri Jul 25 08:18:50 2014 +++ src/sys/sys/vnode_if.h Mon Apr 20 23:03:09 2015 @@ -1,11 +1,11 @@ -/* $NetBSD: vnode_if.h,v 1.88 2014/07/25 08:18:50 dholland Exp $ */ +/* $NetBSD: vnode_if.h,v 1.89 2015/04/20 23:03:09 riastradh Exp $ */ /* * Warning: DO NOT EDIT! This file is automatically generated! * (Modifications made here may easily be lost!) * * Created from the file: - * NetBSD: vnode_if.src,v 1.67 2014/07/25 08:16:47 dholland Exp + * NetBSD: vnode_if.src,v 1.68 2015/04/20 22:59:19 riastradh Exp * by the script: * NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp */ @@ -280,7 +280,7 @@ extern const struct vnodeop_desc vop_rem int VOP_REMOVE(struct vnode *, struct vnode *, struct componentname *); #define VOP_LINK_DESCOFFSET 23 -struct vop_link_args { +struct vop_link_v2_args { const struct vnodeop_desc *a_desc; struct vnode *a_dvp; struct vnode *a_vp; Index: src/sys/ufs/chfs/chfs_vnops.c diff -u src/sys/ufs/chfs/chfs_vnops.c:1.27 src/sys/ufs/chfs/chfs_vnops.c:1.28 --- src/sys/ufs/chfs/chfs_vnops.c:1.27 Sat Mar 28 19:24:04 2015 +++ src/sys/ufs/chfs/chfs_vnops.c Mon Apr 20 23:03:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: chfs_vnops.c,v 1.27 2015/03/28 19:24:04 maxv Exp $ */ +/* $NetBSD: chfs_vnops.c,v 1.28 2015/04/20 23:03:09 riastradh Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -1075,9 +1075,9 @@ out: int chfs_link(void *v) { - struct vnode *dvp = ((struct vop_link_args *) v)->a_dvp; - struct vnode *vp = ((struct vop_link_args *) v)->a_vp; - struct componentname *cnp = ((struct vop_link_args *) v)->a_cnp; + struct vnode *dvp = ((struct vop_link_v2_args *) v)->a_dvp; + struct vnode *vp = ((struct vop_link_v2_args *) v)->a_vp; + struct componentname *cnp = ((struct vop_link_v2_args *) v)->a_cnp; struct chfs_inode *ip, *parent; int error = 0; @@ -1106,7 +1106,6 @@ chfs_link(void *v) if (dvp != vp) VOP_UNLOCK(vp); out: - vput(dvp); return error; } Index: src/sys/ufs/ext2fs/ext2fs_vnops.c diff -u src/sys/ufs/ext2fs/ext2fs_vnops.c:1.116 src/sys/ufs/ext2fs/ext2fs_vnops.c:1.117 --- src/sys/ufs/ext2fs/ext2fs_vnops.c:1.116 Fri Mar 27 17:27:56 2015 +++ src/sys/ufs/ext2fs/ext2fs_vnops.c Mon Apr 20 23:03:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_vnops.c,v 1.116 2015/03/27 17:27:56 riastradh Exp $ */ +/* $NetBSD: ext2fs_vnops.c,v 1.117 2015/04/20 23:03:09 riastradh Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.116 2015/03/27 17:27:56 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.117 2015/04/20 23:03:09 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -589,7 +589,7 @@ ext2fs_remove(void *v) int ext2fs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -639,7 +639,6 @@ out1: out2: VN_KNOTE(vp, NOTE_LINK); VN_KNOTE(dvp, NOTE_WRITE); - vput(dvp); return (error); } Index: src/sys/ufs/lfs/lfs_vnops.c diff -u src/sys/ufs/lfs/lfs_vnops.c:1.270 src/sys/ufs/lfs/lfs_vnops.c:1.271 --- src/sys/ufs/lfs/lfs_vnops.c:1.270 Fri Mar 27 17:27:56 2015 +++ src/sys/ufs/lfs/lfs_vnops.c Mon Apr 20 23:03:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_vnops.c,v 1.270 2015/03/27 17:27:56 riastradh Exp $ */ +/* $NetBSD: lfs_vnops.c,v 1.271 2015/04/20 23:03:09 riastradh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -125,7 +125,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.270 2015/03/27 17:27:56 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.271 2015/04/20 23:03:09 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1231,7 +1231,7 @@ lfs_rmdir(void *v) int lfs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -1250,12 +1250,6 @@ lfs_link(void *v) error = lfs_set_dirop(dvp, NULL); if (error) { - /* - * XXX dholland 20140515 this was here before but must - * be wrong. - */ - vput(dvp); - return error; } Index: src/sys/ufs/lfs/ulfs_vnops.c diff -u src/sys/ufs/lfs/ulfs_vnops.c:1.24 src/sys/ufs/lfs/ulfs_vnops.c:1.25 --- src/sys/ufs/lfs/ulfs_vnops.c:1.24 Mon Apr 20 21:02:49 2015 +++ src/sys/ufs/lfs/ulfs_vnops.c Mon Apr 20 23:03:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_vnops.c,v 1.24 2015/04/20 21:02:49 riastradh Exp $ */ +/* $NetBSD: ulfs_vnops.c,v 1.25 2015/04/20 23:03:09 riastradh Exp $ */ /* from NetBSD: ufs_vnops.c,v 1.213 2013/06/08 05:47:02 kardel Exp */ /*- @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ulfs_vnops.c,v 1.24 2015/04/20 21:02:49 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ulfs_vnops.c,v 1.25 2015/04/20 23:03:09 riastradh Exp $"); #if defined(_KERNEL_OPT) #include "opt_lfs.h" @@ -541,7 +541,7 @@ ulfs_remove(void *v) int ulfs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -600,7 +600,6 @@ ulfs_link(void *v) out2: VN_KNOTE(vp, NOTE_LINK); VN_KNOTE(dvp, NOTE_WRITE); - vput(dvp); fstrans_done(mp); return (error); } Index: src/sys/ufs/ufs/ufs_vnops.c diff -u src/sys/ufs/ufs/ufs_vnops.c:1.229 src/sys/ufs/ufs/ufs_vnops.c:1.230 --- src/sys/ufs/ufs/ufs_vnops.c:1.229 Mon Apr 20 21:02:49 2015 +++ src/sys/ufs/ufs/ufs_vnops.c Mon Apr 20 23:03:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_vnops.c,v 1.229 2015/04/20 21:02:49 riastradh Exp $ */ +/* $NetBSD: ufs_vnops.c,v 1.230 2015/04/20 23:03:09 riastradh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.229 2015/04/20 21:02:49 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.230 2015/04/20 23:03:09 riastradh Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -766,7 +766,7 @@ ufs_remove(void *v) int ufs_link(void *v) { - struct vop_link_args /* { + struct vop_link_v2_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; @@ -832,7 +832,6 @@ ufs_link(void *v) out2: VN_KNOTE(vp, NOTE_LINK); VN_KNOTE(dvp, NOTE_WRITE); - vput(dvp); fstrans_done(mp); return (error); }