summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Marie <semarie@cvs.openbsd.org>2021-10-15 06:30:07 +0000
committerSebastien Marie <semarie@cvs.openbsd.org>2021-10-15 06:30:07 +0000
commit7b2952869b89d0682a0b896eda9252154685d971 (patch)
treea40acde86c670dc4d26aa44f8cece98dcbb8374f
parentd20b73cea798c9da6cfaab2e8d00e960cf55a488 (diff)
vnode: remove vop_generic_{,is,un}lock stub functions
These functions are only stubs (returning 0). Replace them with nullop function (same behaviour). There is no intented behaviour changes. While here, reorder some vop_islocked member in structs to be next others vop_{,un}lock members. ok visa@
-rw-r--r--sys/kern/spec_vnops.c8
-rw-r--r--sys/kern/vfs_default.c33
-rw-r--r--sys/kern/vfs_sync.c8
-rw-r--r--sys/miscfs/deadfs/dead_vnops.c6
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c8
-rw-r--r--sys/ntfs/ntfs_vnops.c8
-rw-r--r--sys/sys/vnode.h5
-rw-r--r--sys/ufs/mfs/mfs_vnops.c8
8 files changed, 25 insertions, 59 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index c018508380a..8e0c64c4b12 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.105 2021/10/02 08:51:41 semarie Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.106 2021/10/15 06:30:06 semarie Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -89,9 +89,9 @@ const struct vops spec_vops = {
.vop_abortop = vop_generic_badop,
.vop_inactive = spec_inactive,
.vop_reclaim = nullop,
- .vop_lock = vop_generic_lock,
- .vop_unlock = vop_generic_unlock,
- .vop_islocked = vop_generic_islocked,
+ .vop_lock = nullop,
+ .vop_unlock = nullop,
+ .vop_islocked = nullop,
.vop_bmap = vop_generic_bmap,
.vop_strategy = spec_strategy,
.vop_print = spec_print,
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index b661ba724de..7df5a5757b9 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_default.c,v 1.49 2021/10/02 08:51:41 semarie Exp $ */
+/* $OpenBSD: vfs_default.c,v 1.50 2021/10/15 06:30:06 semarie Exp $ */
/*
* Portions of this code are:
@@ -167,37 +167,6 @@ vop_generic_abortop(void *v)
return (0);
}
-/*
- * Stubs to use when there is no locking to be done on the underlying object.
- * A minimal shared lock is necessary to ensure that the underlying object
- * is not revoked while an operation is in progress. So, an active shared
- * count should be maintained in an auxiliary vnode lock structure. However,
- * that's not done now.
- */
-int
-vop_generic_lock(void *v)
-{
- return (0);
-}
-
-/*
- * Decrement the active use count. (Not done currently)
- */
-int
-vop_generic_unlock(void *v)
-{
- return (0);
-}
-
-/*
- * Return whether or not the node is in use. (Not done currently)
- */
-int
-vop_generic_islocked(void *v)
-{
- return (0);
-}
-
const struct filterops generic_filtops = {
.f_flags = FILTEROP_ISFD,
.f_attach = NULL,
diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c
index 65ef86619a7..db5340e8628 100644
--- a/sys/kern/vfs_sync.c
+++ b/sys/kern/vfs_sync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_sync.c,v 1.66 2021/06/15 05:24:47 dlg Exp $ */
+/* $OpenBSD: vfs_sync.c,v 1.67 2021/10/15 06:30:06 semarie Exp $ */
/*
* Portions of this code are:
@@ -267,9 +267,9 @@ const struct vops sync_vops = {
.vop_fsync = sync_fsync,
.vop_inactive = sync_inactive,
.vop_reclaim = nullop,
- .vop_lock = vop_generic_lock,
- .vop_unlock = vop_generic_unlock,
- .vop_islocked = vop_generic_islocked,
+ .vop_lock = nullop,
+ .vop_unlock = nullop,
+ .vop_islocked = nullop,
.vop_print = sync_print
};
diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c
index a2a4643c464..7c650536116 100644
--- a/sys/miscfs/deadfs/dead_vnops.c
+++ b/sys/miscfs/deadfs/dead_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dead_vnops.c,v 1.36 2021/10/02 08:51:41 semarie Exp $ */
+/* $OpenBSD: dead_vnops.c,v 1.37 2021/10/15 06:30:06 semarie Exp $ */
/* $NetBSD: dead_vnops.c,v 1.16 1996/02/13 13:12:48 mycroft Exp $ */
/*
@@ -89,11 +89,11 @@ const struct vops dead_vops = {
.vop_inactive = dead_inactive,
.vop_reclaim = nullop,
.vop_lock = dead_lock,
- .vop_unlock = vop_generic_unlock,
+ .vop_unlock = nullop,
+ .vop_islocked = nullop,
.vop_bmap = dead_bmap,
.vop_strategy = dead_strategy,
.vop_print = dead_print,
- .vop_islocked = vop_generic_islocked,
.vop_pathconf = dead_ebadf,
.vop_advlock = dead_ebadf,
.vop_bwrite = nullop,
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index f2d49e4322d..072187f1e80 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo_vnops.c,v 1.81 2021/10/02 08:51:41 semarie Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.82 2021/10/15 06:30:06 semarie Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
@@ -91,12 +91,12 @@ const struct vops fifo_vops = {
.vop_abortop = vop_generic_badop,
.vop_inactive = fifo_inactive,
.vop_reclaim = fifo_reclaim,
- .vop_lock = vop_generic_lock,
- .vop_unlock = vop_generic_unlock,
+ .vop_lock = nullop,
+ .vop_unlock = nullop,
+ .vop_islocked = nullop,
.vop_bmap = vop_generic_bmap,
.vop_strategy = vop_generic_badop,
.vop_print = fifo_print,
- .vop_islocked = vop_generic_islocked,
.vop_pathconf = fifo_pathconf,
.vop_advlock = fifo_advlock,
.vop_bwrite = nullop
diff --git a/sys/ntfs/ntfs_vnops.c b/sys/ntfs/ntfs_vnops.c
index fa334e23c17..d239112e991 100644
--- a/sys/ntfs/ntfs_vnops.c
+++ b/sys/ntfs/ntfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_vnops.c,v 1.46 2020/02/27 09:10:31 mpi Exp $ */
+/* $OpenBSD: ntfs_vnops.c,v 1.47 2021/10/15 06:30:06 semarie Exp $ */
/* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */
/*
@@ -668,9 +668,9 @@ const struct vops ntfs_vops = {
.vop_reclaim = ntfs_reclaim,
.vop_print = ntfs_print,
.vop_pathconf = ntfs_pathconf,
- .vop_islocked = vop_generic_islocked,
- .vop_unlock = vop_generic_unlock,
- .vop_lock = vop_generic_lock,
+ .vop_lock = nullop,
+ .vop_unlock = nullop,
+ .vop_islocked = nullop,
.vop_lookup = ntfs_lookup,
.vop_access = ntfs_access,
.vop_close = ntfs_close,
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 3668f954a9a..c72c0711476 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.159 2021/10/04 08:11:02 claudio Exp $ */
+/* $OpenBSD: vnode.h,v 1.160 2021/10/15 06:30:06 semarie Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -630,9 +630,6 @@ int vop_generic_abortop(void *);
int vop_generic_badop(void *);
int vop_generic_bmap(void *);
int vop_generic_bwrite(void *);
-int vop_generic_islocked(void *);
-int vop_generic_lock(void *);
-int vop_generic_unlock(void *);
int vop_generic_revoke(void *);
int vop_generic_kqfilter(void *);
int vop_generic_lookup(void *);
diff --git a/sys/ufs/mfs/mfs_vnops.c b/sys/ufs/mfs/mfs_vnops.c
index 98484b064db..eba90ab9131 100644
--- a/sys/ufs/mfs/mfs_vnops.c
+++ b/sys/ufs/mfs/mfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfs_vnops.c,v 1.57 2021/10/08 08:34:09 claudio Exp $ */
+/* $OpenBSD: mfs_vnops.c,v 1.58 2021/10/15 06:30:06 semarie Exp $ */
/* $NetBSD: mfs_vnops.c,v 1.8 1996/03/17 02:16:32 christos Exp $ */
/*
@@ -74,12 +74,12 @@ const struct vops mfs_vops = {
.vop_abortop = vop_generic_badop,
.vop_inactive = mfs_inactive,
.vop_reclaim = mfs_reclaim,
- .vop_lock = vop_generic_lock,
- .vop_unlock = vop_generic_unlock,
+ .vop_lock = nullop,
+ .vop_unlock = nullop,
+ .vop_islocked = nullop,
.vop_bmap = vop_generic_bmap,
.vop_strategy = mfs_strategy,
.vop_print = mfs_print,
- .vop_islocked = vop_generic_islocked,
.vop_pathconf = vop_generic_badop,
.vop_advlock = vop_generic_badop,
.vop_bwrite = vop_generic_bwrite