diff options
author | Sebastien Marie <semarie@cvs.openbsd.org> | 2021-10-02 08:51:42 +0000 |
---|---|---|
committer | Sebastien Marie <semarie@cvs.openbsd.org> | 2021-10-02 08:51:42 +0000 |
commit | b26633e1f78f8bdc419659e36ee29519d3e770a0 (patch) | |
tree | 7af018003ec22326519a58b33470be082abc13cd /sys/miscfs | |
parent | f448adec66db474162a941cb8c4dd153085d04e3 (diff) |
vfs: merge *_badop to vop_generic_badop
It replaces spec_badop, fifo_badop, dead_badop and mfs_badop, which
are only calls to panic(9), to one unique function vop_generic_badop().
No intented behaviour changes (outside the panic message which isn't
the same).
ok mpi@
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/deadfs/dead_vnops.c | 32 | ||||
-rw-r--r-- | sys/miscfs/fifofs/fifo.h | 3 | ||||
-rw-r--r-- | sys/miscfs/fifofs/fifo_vnops.c | 40 |
3 files changed, 24 insertions, 51 deletions
diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c index 8aada87b09e..a2a4643c464 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.35 2021/04/28 09:53:53 claudio Exp $ */ +/* $OpenBSD: dead_vnops.c,v 1.36 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: dead_vnops.c,v 1.16 1996/02/13 13:12:48 mycroft Exp $ */ /* @@ -45,7 +45,6 @@ /* * Prototypes for dead operations on vnodes. */ -int dead_badop(void *); int dead_ebadf(void *); int dead_open(void *); @@ -64,8 +63,8 @@ int chkvnlock(struct vnode *); const struct vops dead_vops = { .vop_lookup = vop_generic_lookup, - .vop_create = dead_badop, - .vop_mknod = dead_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = dead_open, .vop_close = nullop, .vop_access = dead_ebadf, @@ -78,15 +77,15 @@ const struct vops dead_vops = { .vop_kqfilter = dead_kqfilter, .vop_revoke = NULL, .vop_fsync = nullop, - .vop_remove = dead_badop, - .vop_link = dead_badop, - .vop_rename = dead_badop, - .vop_mkdir = dead_badop, - .vop_rmdir = dead_badop, - .vop_symlink = dead_badop, + .vop_remove = vop_generic_badop, + .vop_link = vop_generic_badop, + .vop_rename = vop_generic_badop, + .vop_mkdir = vop_generic_badop, + .vop_rmdir = vop_generic_badop, + .vop_symlink = vop_generic_badop, .vop_readdir = dead_ebadf, .vop_readlink = dead_ebadf, - .vop_abortop = dead_badop, + .vop_abortop = vop_generic_badop, .vop_inactive = dead_inactive, .vop_reclaim = nullop, .vop_lock = dead_lock, @@ -266,17 +265,6 @@ dead_ebadf(void *v) } /* - * Empty vnode bad operation - */ -/*ARGSUSED*/ -int -dead_badop(void *v) -{ - panic("dead_badop called"); - /* NOTREACHED */ -} - -/* * We have to wait during times when the vnode is * in a state of change. */ diff --git a/sys/miscfs/fifofs/fifo.h b/sys/miscfs/fifofs/fifo.h index 140563c52f1..3260dabdf98 100644 --- a/sys/miscfs/fifofs/fifo.h +++ b/sys/miscfs/fifofs/fifo.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fifo.h,v 1.22 2010/12/21 20:14:43 thib Exp $ */ +/* $OpenBSD: fifo.h,v 1.23 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: fifo.h,v 1.10 1996/02/09 22:40:15 christos Exp $ */ /* @@ -36,7 +36,6 @@ /* * Prototypes for fifo operations on vnodes. */ -int fifo_badop(void *); int fifo_ebadf(void *); int fifo_open(void *); diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index 5082e96c9d2..f2d49e4322d 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.80 2021/07/13 07:37:50 visa Exp $ */ +/* $OpenBSD: fifo_vnops.c,v 1.81 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */ /* @@ -66,8 +66,8 @@ struct fifoinfo { const struct vops fifo_vops = { .vop_lookup = vop_generic_lookup, - .vop_create = fifo_badop, - .vop_mknod = fifo_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = fifo_open, .vop_close = fifo_close, .vop_access = fifo_ebadf, @@ -80,21 +80,21 @@ const struct vops fifo_vops = { .vop_kqfilter = fifo_kqfilter, .vop_revoke = vop_generic_revoke, .vop_fsync = nullop, - .vop_remove = fifo_badop, - .vop_link = fifo_badop, - .vop_rename = fifo_badop, - .vop_mkdir = fifo_badop, - .vop_rmdir = fifo_badop, - .vop_symlink = fifo_badop, - .vop_readdir = fifo_badop, - .vop_readlink = fifo_badop, - .vop_abortop = fifo_badop, + .vop_remove = vop_generic_badop, + .vop_link = vop_generic_badop, + .vop_rename = vop_generic_badop, + .vop_mkdir = vop_generic_badop, + .vop_rmdir = vop_generic_badop, + .vop_symlink = vop_generic_badop, + .vop_readdir = vop_generic_badop, + .vop_readlink = vop_generic_badop, + .vop_abortop = vop_generic_badop, .vop_inactive = fifo_inactive, .vop_reclaim = fifo_reclaim, .vop_lock = vop_generic_lock, .vop_unlock = vop_generic_unlock, .vop_bmap = vop_generic_bmap, - .vop_strategy = fifo_badop, + .vop_strategy = vop_generic_badop, .vop_print = fifo_print, .vop_islocked = vop_generic_islocked, .vop_pathconf = fifo_pathconf, @@ -499,20 +499,6 @@ fifo_advlock(void *v) return (EOPNOTSUPP); } -/* - * Fifo bad operation - */ -/*ARGSUSED*/ -int -fifo_badop(void *v) -{ - - panic("fifo_badop called"); - /* NOTREACHED */ - return(0); -} - - int fifo_kqfilter(void *v) { |