From 9aafff14e70d6372f27715d6e30deafb68a50f57 Mon Sep 17 00:00:00 2001 From: semarie Date: Sat, 2 Oct 2021 08:51:41 +0000 Subject: [PATCH] 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@ --- sys/isofs/cd9660/cd9660_vnops.c | 48 ++++++++++++++--------------- sys/kern/spec_vnops.c | 35 ++++++++-------------- sys/kern/vfs_default.c | 8 ++++- sys/miscfs/deadfs/dead_vnops.c | 32 +++++++------------- sys/miscfs/fifofs/fifo.h | 3 +- sys/miscfs/fifofs/fifo_vnops.c | 40 ++++++++----------------- sys/nfs/nfs_vnops.c | 48 ++++++++++++++--------------- sys/sys/specdev.h | 3 +- sys/sys/vnode.h | 3 +- sys/tmpfs/tmpfs_fifoops.c | 26 ++++++++-------- sys/tmpfs/tmpfs_specops.c | 24 +++++++-------- sys/ufs/ext2fs/ext2fs_vnops.c | 48 ++++++++++++++--------------- sys/ufs/ffs/ffs_vnops.c | 48 ++++++++++++++--------------- sys/ufs/mfs/mfs_extern.h | 3 +- sys/ufs/mfs/mfs_vnops.c | 53 ++++++++++++++------------------- 15 files changed, 190 insertions(+), 232 deletions(-) diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 06ab7114aa8..ed1b5f39c71 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.89 2021/03/24 16:17:05 semarie Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.90 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -865,8 +865,8 @@ const struct vops cd9660_specvops = { /* XXX: Keep in sync with spec_vops. */ .vop_lookup = vop_generic_lookup, - .vop_create = spec_badop, - .vop_mknod = spec_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = spec_open, .vop_close = spec_close, .vop_read = spec_read, @@ -876,15 +876,15 @@ const struct vops cd9660_specvops = { .vop_kqfilter = spec_kqfilter, .vop_revoke = vop_generic_revoke, .vop_fsync = spec_fsync, - .vop_remove = spec_badop, - .vop_link = spec_badop, - .vop_rename = spec_badop, - .vop_mkdir = spec_badop, - .vop_rmdir = spec_badop, - .vop_symlink = spec_badop, - .vop_readdir = spec_badop, - .vop_readlink = spec_badop, - .vop_abortop = spec_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_bmap = vop_generic_bmap, .vop_strategy = spec_strategy, .vop_pathconf = spec_pathconf, @@ -907,8 +907,8 @@ const struct vops cd9660_fifovops = { /* XXX: Keep in sync with 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_read = fifo_read, @@ -918,17 +918,17 @@ const struct vops cd9660_fifovops = { .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_bmap = vop_generic_bmap, - .vop_strategy = fifo_badop, + .vop_strategy = vop_generic_badop, .vop_pathconf = fifo_pathconf, .vop_advlock = fifo_advlock, }; diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c index 0e0071ce719..c018508380a 100644 --- a/sys/kern/spec_vnops.c +++ b/sys/kern/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.104 2021/04/28 09:53:53 claudio Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.105 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -64,8 +64,8 @@ struct vnodechain speclisth[SPECHSZ]; const struct vops spec_vops = { .vop_lookup = vop_generic_lookup, - .vop_create = spec_badop, - .vop_mknod = spec_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = spec_open, .vop_close = spec_close, .vop_access = spec_access, @@ -78,15 +78,15 @@ const struct vops spec_vops = { .vop_kqfilter = spec_kqfilter, .vop_revoke = vop_generic_revoke, .vop_fsync = spec_fsync, - .vop_remove = spec_badop, - .vop_link = spec_badop, - .vop_rename = spec_badop, - .vop_mkdir = spec_badop, - .vop_rmdir = spec_badop, - .vop_symlink = spec_badop, - .vop_readdir = spec_badop, - .vop_readlink = spec_badop, - .vop_abortop = spec_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 = spec_inactive, .vop_reclaim = nullop, .vop_lock = vop_generic_lock, @@ -698,17 +698,6 @@ spec_advlock(void *v) ap->a_op, ap->a_fl, ap->a_flags)); } -/* - * Special device bad operation - */ -int -spec_badop(void *v) -{ - - panic("spec_badop called"); - /* NOTREACHED */ -} - /* * Copyright (c) 2006 Pedro Martelletto * Copyright (c) 2006 Thordur Bjornsson diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 04c815f8be4..b661ba724de 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_default.c,v 1.48 2021/04/28 09:53:53 claudio Exp $ */ +/* $OpenBSD: vfs_default.c,v 1.49 2021/10/02 08:51:41 semarie Exp $ */ /* * Portions of this code are: @@ -127,6 +127,12 @@ vop_generic_revoke(void *v) return (0); } +int +vop_generic_badop(void *v) +{ + panic("%s", __func__); +} + int vop_generic_bmap(void *v) { 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, @@ -265,17 +264,6 @@ dead_ebadf(void *v) return (EBADF); } -/* - * 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) { diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 6e0362c0755..69fe85b41cd 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.186 2021/03/11 13:31:35 jsg Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.187 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -193,22 +193,22 @@ const struct vops nfs_specvops = { /* XXX: Keep in sync with spec_vops. */ .vop_lookup = vop_generic_lookup, - .vop_create = spec_badop, - .vop_mknod = spec_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = spec_open, .vop_ioctl = spec_ioctl, .vop_poll = spec_poll, .vop_kqfilter = spec_kqfilter, .vop_revoke = vop_generic_revoke, - .vop_remove = spec_badop, - .vop_link = spec_badop, - .vop_rename = spec_badop, - .vop_mkdir = spec_badop, - .vop_rmdir = spec_badop, - .vop_symlink = spec_badop, - .vop_readdir = spec_badop, - .vop_readlink = spec_badop, - .vop_abortop = spec_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_bmap = vop_generic_bmap, .vop_strategy = spec_strategy, .vop_pathconf = spec_pathconf, @@ -235,24 +235,24 @@ const struct vops nfs_fifovops = { /* XXX: Keep in sync with 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_ioctl = fifo_ioctl, .vop_poll = fifo_poll, .vop_kqfilter = fifo_kqfilter, .vop_revoke = vop_generic_revoke, - .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_bmap = vop_generic_bmap, - .vop_strategy = fifo_badop, + .vop_strategy = vop_generic_badop, .vop_pathconf = fifo_pathconf, .vop_advlock = fifo_advlock, }; diff --git a/sys/sys/specdev.h b/sys/sys/specdev.h index 2570b20ba81..529de2f14ef 100644 --- a/sys/sys/specdev.h +++ b/sys/sys/specdev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: specdev.h,v 1.39 2019/12/27 22:17:01 bluhm Exp $ */ +/* $OpenBSD: specdev.h,v 1.40 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */ /* @@ -92,7 +92,6 @@ extern struct vnodechain speclisth[SPECHSZ]; /* * Prototypes for special file operations on vnodes. */ -int spec_badop(void *); int spec_getattr(void *); int spec_setattr(void *); int spec_access(void *); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 8a9dce55bb7..d393c7cce6c 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.157 2021/04/28 09:53:53 claudio Exp $ */ +/* $OpenBSD: vnode.h,v 1.158 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -628,6 +628,7 @@ int vfs_getcwd_getcache(struct vnode **, struct vnode **, char **, char *); /* vfs_default.c */ 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 *); diff --git a/sys/tmpfs/tmpfs_fifoops.c b/sys/tmpfs/tmpfs_fifoops.c index 0fa47f587e6..dbb92492c53 100644 --- a/sys/tmpfs/tmpfs_fifoops.c +++ b/sys/tmpfs/tmpfs_fifoops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_fifoops.c,v 1.5 2020/01/20 23:21:56 claudio Exp $ */ +/* $OpenBSD: tmpfs_fifoops.c,v 1.6 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: tmpfs_fifoops.c,v 1.9 2011/05/24 20:17:49 rmind Exp $ */ /* @@ -54,8 +54,8 @@ int tmpfs_fifo_fsync (void *); const struct vops tmpfs_fifovops = { .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 = tmpfs_access, @@ -68,21 +68,21 @@ const struct vops tmpfs_fifovops = { .vop_kqfilter = fifo_kqfilter, .vop_revoke = vop_generic_revoke, .vop_fsync = tmpfs_fifo_fsync, - .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 = tmpfs_inactive, .vop_reclaim = tmpfs_reclaim, .vop_lock = tmpfs_lock, .vop_unlock = tmpfs_unlock, .vop_bmap = vop_generic_bmap, - .vop_strategy = fifo_badop, + .vop_strategy = vop_generic_badop, .vop_print = tmpfs_print, .vop_islocked = tmpfs_islocked, .vop_pathconf = fifo_pathconf, diff --git a/sys/tmpfs/tmpfs_specops.c b/sys/tmpfs/tmpfs_specops.c index c4822494ee8..1c3069d9cd6 100644 --- a/sys/tmpfs/tmpfs_specops.c +++ b/sys/tmpfs/tmpfs_specops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_specops.c,v 1.7 2021/06/29 16:15:37 claudio Exp $ */ +/* $OpenBSD: tmpfs_specops.c,v 1.8 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: tmpfs_specops.c,v 1.10 2011/05/24 20:17:49 rmind Exp $ */ /* @@ -67,22 +67,22 @@ const struct vops tmpfs_specvops = { /* keep in sync with spec_vops */ .vop_lookup = vop_generic_lookup, - .vop_create = spec_badop, - .vop_mknod = spec_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = spec_open, .vop_ioctl = spec_ioctl, .vop_poll = spec_poll, .vop_kqfilter = spec_kqfilter, .vop_revoke = vop_generic_revoke, - .vop_remove = spec_badop, - .vop_link = spec_badop, - .vop_rename = spec_badop, - .vop_mkdir = spec_badop, - .vop_rmdir = spec_badop, - .vop_symlink = spec_badop, - .vop_readdir = spec_badop, - .vop_readlink = spec_badop, - .vop_abortop = spec_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_bmap = vop_generic_bmap, .vop_strategy = spec_strategy, .vop_pathconf = spec_pathconf, diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index be659eb7f14..2fd55f2dc63 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.88 2021/03/24 16:11:32 semarie Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.89 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -1321,22 +1321,22 @@ const struct vops ext2fs_specvops = { /* XXX: Keep in sync with spec_vops. */ .vop_lookup = vop_generic_lookup, - .vop_create = spec_badop, - .vop_mknod = spec_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = spec_open, .vop_ioctl = spec_ioctl, .vop_poll = spec_poll, .vop_kqfilter = spec_kqfilter, .vop_revoke = vop_generic_revoke, - .vop_remove = spec_badop, - .vop_link = spec_badop, - .vop_rename = spec_badop, - .vop_mkdir = spec_badop, - .vop_rmdir = spec_badop, - .vop_symlink = spec_badop, - .vop_readdir = spec_badop, - .vop_readlink = spec_badop, - .vop_abortop = spec_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_bmap = vop_generic_bmap, .vop_strategy = spec_strategy, .vop_pathconf = spec_pathconf, @@ -1363,24 +1363,24 @@ const struct vops ext2fs_fifovops = { /* XXX: Keep in sync with 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_ioctl = fifo_ioctl, .vop_poll = fifo_poll, .vop_kqfilter = fifo_kqfilter, .vop_revoke = vop_generic_revoke, - .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_bmap = vop_generic_bmap, - .vop_strategy = fifo_badop, + .vop_strategy = vop_generic_badop, .vop_pathconf = fifo_pathconf, .vop_advlock = fifo_advlock, }; diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 82bde4d4256..4f488043d9d 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vnops.c,v 1.98 2020/02/27 09:10:31 mpi Exp $ */ +/* $OpenBSD: ffs_vnops.c,v 1.99 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */ /* @@ -112,22 +112,22 @@ const struct vops ffs_specvops = { /* XXX: Keep in sync with spec_vops */ .vop_lookup = vop_generic_lookup, - .vop_create = spec_badop, - .vop_mknod = spec_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = spec_open, .vop_ioctl = spec_ioctl, .vop_poll = spec_poll, .vop_kqfilter = spec_kqfilter, .vop_revoke = vop_generic_revoke, - .vop_remove = spec_badop, - .vop_link = spec_badop, - .vop_rename = spec_badop, - .vop_mkdir = spec_badop, - .vop_rmdir = spec_badop, - .vop_symlink = spec_badop, - .vop_readdir = spec_badop, - .vop_readlink = spec_badop, - .vop_abortop = spec_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_bmap = vop_generic_bmap, .vop_strategy = spec_strategy, .vop_pathconf = spec_pathconf, @@ -154,24 +154,24 @@ const struct vops ffs_fifovops = { /* XXX: Keep in sync with 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_ioctl = fifo_ioctl, .vop_poll = fifo_poll, .vop_kqfilter = fifo_kqfilter, .vop_revoke = vop_generic_revoke, - .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_bmap = vop_generic_bmap, - .vop_strategy = fifo_badop, + .vop_strategy = vop_generic_badop, .vop_pathconf = fifo_pathconf, .vop_advlock = fifo_advlock }; diff --git a/sys/ufs/mfs/mfs_extern.h b/sys/ufs/mfs/mfs_extern.h index bce3f7b0450..ed133bb42ac 100644 --- a/sys/ufs/mfs/mfs_extern.h +++ b/sys/ufs/mfs/mfs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mfs_extern.h,v 1.21 2021/03/24 16:17:06 semarie Exp $ */ +/* $OpenBSD: mfs_extern.h,v 1.22 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: mfs_extern.h,v 1.4 1996/02/09 22:31:27 christos Exp $ */ /*- @@ -61,5 +61,4 @@ int mfs_close(void *); int mfs_inactive(void *); int mfs_reclaim(void *); int mfs_print(void *); -int mfs_badop(void *); diff --git a/sys/ufs/mfs/mfs_vnops.c b/sys/ufs/mfs/mfs_vnops.c index 0589b172829..ad0ff3dee23 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.55 2021/03/24 16:17:06 semarie Exp $ */ +/* $OpenBSD: mfs_vnops.c,v 1.56 2021/10/02 08:51:41 semarie Exp $ */ /* $NetBSD: mfs_vnops.c,v 1.8 1996/03/17 02:16:32 christos Exp $ */ /* @@ -48,30 +48,30 @@ /* mfs vnode operations. */ const struct vops mfs_vops = { - .vop_lookup = mfs_badop, - .vop_create = mfs_badop, - .vop_mknod = mfs_badop, + .vop_lookup = vop_generic_badop, + .vop_create = vop_generic_badop, + .vop_mknod = vop_generic_badop, .vop_open = mfs_open, .vop_close = mfs_close, - .vop_access = mfs_badop, - .vop_getattr = mfs_badop, - .vop_setattr = mfs_badop, - .vop_read = mfs_badop, - .vop_write = mfs_badop, + .vop_access = vop_generic_badop, + .vop_getattr = vop_generic_badop, + .vop_setattr = vop_generic_badop, + .vop_read = vop_generic_badop, + .vop_write = vop_generic_badop, .vop_ioctl = mfs_ioctl, - .vop_poll = mfs_badop, - .vop_kqfilter = mfs_badop, + .vop_poll = vop_generic_badop, + .vop_kqfilter = vop_generic_badop, .vop_revoke = vop_generic_revoke, .vop_fsync = spec_fsync, - .vop_remove = mfs_badop, - .vop_link = mfs_badop, - .vop_rename = mfs_badop, - .vop_mkdir = mfs_badop, - .vop_rmdir = mfs_badop, - .vop_symlink = mfs_badop, - .vop_readdir = mfs_badop, - .vop_readlink = mfs_badop, - .vop_abortop = mfs_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 = mfs_inactive, .vop_reclaim = mfs_reclaim, .vop_lock = vop_generic_lock, @@ -80,8 +80,8 @@ const struct vops mfs_vops = { .vop_strategy = mfs_strategy, .vop_print = mfs_print, .vop_islocked = vop_generic_islocked, - .vop_pathconf = mfs_badop, - .vop_advlock = mfs_badop, + .vop_pathconf = vop_generic_badop, + .vop_advlock = vop_generic_badop, .vop_bwrite = vop_generic_bwrite }; @@ -258,12 +258,3 @@ mfs_print(void *v) mfsp->mfs_baseoff, mfsp->mfs_size); return (0); } - -/* - * Block device bad operation - */ -int -mfs_badop(void *v) -{ - panic("mfs_badop called"); -} -- 2.20.1