From b26633e1f78f8bdc419659e36ee29519d3e770a0 Mon Sep 17 00:00:00 2001 From: Sebastien Marie Date: Sat, 2 Oct 2021 08:51:42 +0000 Subject: 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/ufs/mfs/mfs_extern.h | 3 +-- sys/ufs/mfs/mfs_vnops.c | 53 ++++++++++++++++++++---------------------------- 2 files changed, 23 insertions(+), 33 deletions(-) (limited to 'sys/ufs/mfs') 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"); -} -- cgit v1.2.3