summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-08-06 19:35:18 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-08-06 19:35:18 +0000
commit89fedd1a8d2624bae7d2310a83d39156079353b6 (patch)
tree85d9d00a998016639251d59ff97e2a4df0bfa685 /sys/nfs
parent67f0f9ef8777688f212974c7fd984398c1827902 (diff)
Rename vop_revoke, vn_bwrite, vop_noislocked, vop_nolock, vop_nounlock
to be vop_generic_revoke, vop_generic_bwrite, vop_generic_islocked, vop_generic_lock and vop_generic_unlock. Create vop_generic_abortop and propogate change to all file systems. Fix PR/371. Get rid of locking in NULLFS (should be mostly unnecessary now except for forced unmounts).
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_node.c20
-rw-r--r--sys/nfs/nfs_var.h3
-rw-r--r--sys/nfs/nfs_vnops.c10
-rw-r--r--sys/nfs/nfsnode.h11
4 files changed, 12 insertions, 32 deletions
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c
index bce4a38e96b..a2c96342b27 100644
--- a/sys/nfs/nfs_node.c
+++ b/sys/nfs/nfs_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_node.c,v 1.10 1997/11/06 05:59:00 csapuntz Exp $ */
+/* $OpenBSD: nfs_node.c,v 1.11 1998/08/06 19:34:58 csapuntz Exp $ */
/* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */
/*
@@ -239,21 +239,3 @@ nfs_reclaim(v)
return (0);
}
-/*
- * Nfs abort op, called after namei() when a CREATE/DELETE isn't actually
- * done. Currently nothing to do.
- */
-/* ARGSUSED */
-int
-nfs_abortop(v)
- void *v;
-{
- struct vop_abortop_args /* {
- struct vnode *a_dvp;
- struct componentname *a_cnp;
- } */ *ap = v;
-
- if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
- FREE(ap->a_cnp->cn_pnbuf, M_NAMEI);
- return (0);
-}
diff --git a/sys/nfs/nfs_var.h b/sys/nfs/nfs_var.h
index 2b1980c14a5..6696f7f6bf7 100644
--- a/sys/nfs/nfs_var.h
+++ b/sys/nfs/nfs_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_var.h,v 1.8 1998/02/22 01:21:32 niklas Exp $ */
+/* $OpenBSD: nfs_var.h,v 1.9 1998/08/06 19:34:59 csapuntz Exp $ */
/* $NetBSD: nfs_var.h,v 1.3 1996/02/18 11:53:54 fvdl Exp $ */
/*
@@ -81,7 +81,6 @@ u_long nfs_hash __P((nfsfh_t *, int));
int nfs_nget __P((struct mount *, nfsfh_t *, int, struct nfsnode **));
int nfs_inactive __P((void *));
int nfs_reclaim __P((void *));
-int nfs_abortop __P((void *));
/* nfs_vnops.c */
int nfs_null __P((struct vnode *, struct ucred *, struct proc *));
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index aaa1285a392..98d0dc709f5 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.20 1998/05/11 05:42:01 deraadt Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.21 1998/08/06 19:35:00 csapuntz Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -115,7 +115,7 @@ struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
{ &vop_symlink_desc, nfs_symlink }, /* symlink */
{ &vop_readdir_desc, nfs_readdir }, /* readdir */
{ &vop_readlink_desc, nfs_readlink }, /* readlink */
- { &vop_abortop_desc, nfs_abortop }, /* abortop */
+ { &vop_abortop_desc, vop_generic_abortop }, /* abortop */
{ &vop_inactive_desc, nfs_inactive }, /* inactive */
{ &vop_reclaim_desc, nfs_reclaim }, /* reclaim */
{ &vop_lock_desc, nfs_lock }, /* lock */
@@ -186,7 +186,7 @@ struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
{ &vop_vfree_desc, spec_vfree }, /* vfree */
{ &vop_truncate_desc, spec_truncate }, /* truncate */
{ &vop_update_desc, nfs_update }, /* update */
- { &vop_bwrite_desc, vn_bwrite },
+ { &vop_bwrite_desc, vop_generic_bwrite },
{ (struct vnodeop_desc*)NULL, (int(*) __P((void *)))NULL }
};
struct vnodeopv_desc spec_nfsv2nodeop_opv_desc =
@@ -238,7 +238,7 @@ struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
{ &vop_vfree_desc, fifo_vfree }, /* vfree */
{ &vop_truncate_desc, fifo_truncate }, /* truncate */
{ &vop_update_desc, nfs_update }, /* update */
- { &vop_bwrite_desc, vn_bwrite },
+ { &vop_bwrite_desc, vop_generic_bwrite },
{ (struct vnodeop_desc*)NULL, (int(*) __P((void *)))NULL }
};
struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc =
@@ -3077,7 +3077,7 @@ nfs_bwrite(v)
}
/*
- * This is a clone of vn_bwrite(), except that B_WRITEINPROG isn't set unless
+ * This is a clone of vop_generic_bwrite(), except that B_WRITEINPROG isn't set unless
* the force flag is one and it also handles the B_NEEDCOMMIT flag.
*/
int
diff --git a/sys/nfs/nfsnode.h b/sys/nfs/nfsnode.h
index 11d3c517838..d74feea493a 100644
--- a/sys/nfs/nfsnode.h
+++ b/sys/nfs/nfsnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfsnode.h,v 1.6 1997/11/06 05:59:06 csapuntz Exp $ */
+/* $OpenBSD: nfsnode.h,v 1.7 1998/08/06 19:35:02 csapuntz Exp $ */
/* $NetBSD: nfsnode.h,v 1.16 1996/02/18 11:54:04 fvdl Exp $ */
/*
@@ -176,7 +176,7 @@ int nfsfifo_read __P((void *));
int nfsfifo_write __P((void *));
#define nfs_ioctl ((int (*) __P((void *)))enoioctl)
#define nfs_select ((int (*) __P((void *)))seltrue)
-#define nfs_revoke vop_revoke
+#define nfs_revoke vop_generic_revoke
int nfs_mmap __P((void *));
int nfs_fsync __P((void *));
#define nfs_seek ((int (*) __P((void *)))nullop)
@@ -188,12 +188,11 @@ int nfs_rmdir __P((void *));
int nfs_symlink __P((void *));
int nfs_readdir __P((void *));
int nfs_readlink __P((void *));
-int nfs_abortop __P((void *));
int nfs_inactive __P((void *));
int nfs_reclaim __P((void *));
-#define nfs_lock ((int (*) __P((void *)))vop_nolock)
-#define nfs_unlock ((int (*) __P((void *)))vop_nounlock)
-#define nfs_islocked ((int (*) __P((void *)))vop_noislocked)
+#define nfs_lock ((int (*) __P((void *)))vop_generic_lock)
+#define nfs_unlock ((int (*) __P((void *)))vop_generic_unlock)
+#define nfs_islocked ((int (*) __P((void *)))vop_generic_islocked)
int nfs_bmap __P((void *));
int nfs_strategy __P((void *));
int nfs_print __P((void *));