Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Make VOP_LINK return directory still locked and referenced.
details: https://anonhg.NetBSD.org/src/rev/a749140b6e8c
branches: trunk
changeset: 337593:a749140b6e8c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Apr 20 22:59:19 2015 +0000
description:
Make VOP_LINK return directory still locked and referenced.
Ride 7.99.10 bump.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c | 14 ++---------
lib/libp2k/p2k.c | 4 ++-
sys/coda/coda_vnops.c | 7 ++---
sys/fs/adosfs/advnops.c | 7 ++---
sys/fs/cd9660/cd9660_vnops.c | 7 ++---
sys/fs/filecorefs/filecore_vnops.c | 7 ++---
sys/fs/nilfs/nilfs_vnops.c | 7 ++---
sys/fs/puffs/puffs_vnops.c | 11 ++------
sys/fs/tmpfs/TODO | 2 +-
sys/fs/tmpfs/tmpfs_vnops.c | 7 ++---
sys/fs/udf/udf_vnops.c | 7 ++---
sys/fs/union/union_vnops.c | 21 ++++-------------
sys/fs/unionfs/unionfs_vnops.c | 2 +-
sys/fs/v7fs/v7fs_vnops.c | 8 ++----
sys/kern/vfs_syscalls.c | 6 +++-
sys/kern/vnode_if.c | 16 ++++++------
sys/kern/vnode_if.src | 5 ++-
sys/miscfs/deadfs/dead_vnops.c | 8 +++---
sys/miscfs/fdesc/fdesc_vnops.c | 7 ++---
sys/miscfs/kernfs/kernfs_vnops.c | 7 ++---
sys/miscfs/procfs/procfs_vnops.c | 7 ++---
sys/nfs/nfs_serv.c | 7 ++++-
sys/nfs/nfs_vnops.c | 8 ++----
sys/rump/include/rump/rumpvnode_if.h | 4 +-
sys/rump/librump/rumpvfs/rumpvnode_if.c | 6 ++--
sys/sys/vnode_if.h | 6 ++--
sys/ufs/chfs/chfs_vnops.c | 9 +++----
sys/ufs/ext2fs/ext2fs_vnops.c | 7 ++---
sys/ufs/lfs/lfs_vnops.c | 12 ++-------
sys/ufs/lfs/ulfs_vnops.c | 7 ++---
sys/ufs/ufs/ufs_vnops.c | 7 ++---
31 files changed, 100 insertions(+), 140 deletions(-)
diffs (truncated from 1010 to 300 lines):
diff -r 398a58f3e3cb -r a749140b6e8c external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Mon Apr 20 22:46:35 2015 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Mon Apr 20 22:59:19 2015 +0000
@@ -5510,7 +5510,7 @@
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 @@
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
diff -r 398a58f3e3cb -r a749140b6e8c lib/libp2k/p2k.c
--- a/lib/libp2k/p2k.c Mon Apr 20 22:46:35 2015 +0000
+++ b/lib/libp2k/p2k.c Mon Apr 20 22:59:19 2015 +0000
@@ -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 @@
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;
diff -r 398a58f3e3cb -r a749140b6e8c sys/coda/coda_vnops.c
--- a/sys/coda/coda_vnops.c Mon Apr 20 22:46:35 2015 +0000
+++ b/sys/coda/coda_vnops.c Mon Apr 20 22:59:19 2015 +0000
@@ -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 @@
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 @@
CODADEBUG(CODA_LINK, myprintf(("in link result %d\n",error)); )
exit:
- vput(dvp);
return(error);
}
diff -r 398a58f3e3cb -r a749140b6e8c sys/fs/adosfs/advnops.c
--- a/sys/fs/adosfs/advnops.c Mon Apr 20 22:46:35 2015 +0000
+++ b/sys/fs/adosfs/advnops.c Mon Apr 20 22:59:19 2015 +0000
@@ -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 @@
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);
}
diff -r 398a58f3e3cb -r a749140b6e8c sys/fs/cd9660/cd9660_vnops.c
--- a/sys/fs/cd9660/cd9660_vnops.c Mon Apr 20 22:46:35 2015 +0000
+++ b/sys/fs/cd9660/cd9660_vnops.c Mon Apr 20 22:59:19 2015 +0000
@@ -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 @@
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);
}
diff -r 398a58f3e3cb -r a749140b6e8c sys/fs/filecorefs/filecore_vnops.c
--- a/sys/fs/filecorefs/filecore_vnops.c Mon Apr 20 22:46:35 2015 +0000
+++ b/sys/fs/filecorefs/filecore_vnops.c Mon Apr 20 22:59:19 2015 +0000
@@ -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 @@
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);
}
diff -r 398a58f3e3cb -r a749140b6e8c sys/fs/nilfs/nilfs_vnops.c
--- a/sys/fs/nilfs/nilfs_vnops.c Mon Apr 20 22:46:35 2015 +0000
+++ b/sys/fs/nilfs/nilfs_vnops.c Mon Apr 20 22:59:19 2015 +0000
@@ -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 @@
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 @@
VN_KNOTE(vp, NOTE_LINK);
VN_KNOTE(dvp, NOTE_WRITE);
- vput(dvp);
return error;
}
diff -r 398a58f3e3cb -r a749140b6e8c sys/fs/puffs/puffs_vnops.c
--- a/sys/fs/puffs/puffs_vnops.c Mon Apr 20 22:46:35 2015 +0000
+++ b/sys/fs/puffs/puffs_vnops.c Mon Apr 20 22:59:19 2015 +0000
@@ -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 @@
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_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_UPDATECTIME|PUFFS_UPDATEMTIME, 0);
}
- RELEPN_AND_VP(dvp, dpn);
- puffs_releasenode(pn);
-
return error;
}
diff -r 398a58f3e3cb -r a749140b6e8c sys/fs/tmpfs/TODO
--- a/sys/fs/tmpfs/TODO Mon Apr 20 22:46:35 2015 +0000
+++ b/sys/fs/tmpfs/TODO Mon Apr 20 22:59:19 2015 +0000
@@ -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;
diff -r 398a58f3e3cb -r a749140b6e8c sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c Mon Apr 20 22:46:35 2015 +0000
+++ b/sys/fs/tmpfs/tmpfs_vnops.c Mon Apr 20 22:59:19 2015 +0000
@@ -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 @@
int
tmpfs_link(void *v)
Home |
Main Index |
Thread Index |
Old Index