cd9660, mfs: do not hide generic vop functions behind #define
authorsemarie <semarie@openbsd.org>
Wed, 24 Mar 2021 16:17:05 +0000 (16:17 +0000)
committersemarie <semarie@openbsd.org>
Wed, 24 Mar 2021 16:17:05 +0000 (16:17 +0000)
It makes clearer which vop functions are real fileystem-implementations and which one are only stubs.

No functional changes are intented.

ok visa@

sys/isofs/cd9660/cd9660_vnops.c
sys/ufs/mfs/mfs_extern.h
sys/ufs/mfs/mfs_vnops.c

index b7cc93f..06ab711 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cd9660_vnops.c,v 1.88 2021/03/05 07:10:06 jsg Exp $   */
+/*     $OpenBSD: cd9660_vnops.c,v 1.89 2021/03/24 16:17:05 semarie Exp $       */
 /*     $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $       */
 
 /*-
@@ -811,44 +811,29 @@ cd9660_pathconf(void *v)
 /*
  * Global vfs data structures for isofs
  */
-#define        cd9660_create   eopnotsupp
-#define        cd9660_mknod    eopnotsupp
-#define        cd9660_write    eopnotsupp
-#define        cd9660_fsync    nullop
-#define        cd9660_remove   eopnotsupp
-#define        cd9660_rename   eopnotsupp
-#define        cd9660_mkdir    eopnotsupp
-#define        cd9660_rmdir    eopnotsupp
-#define        cd9660_advlock  eopnotsupp
-#define        cd9660_valloc   eopnotsupp
-#define        cd9660_vfree    eopnotsupp
-#define        cd9660_truncate eopnotsupp
-#define        cd9660_update   eopnotsupp
-#define        cd9660_bwrite   eopnotsupp
-#define cd9660_revoke   vop_generic_revoke
 
 /* Global vfs data structures for cd9660. */
 const struct vops cd9660_vops = {
        .vop_lookup     = cd9660_lookup,
-       .vop_create     = cd9660_create,
-       .vop_mknod      = cd9660_mknod,
+       .vop_create     = eopnotsupp,
+       .vop_mknod      = eopnotsupp,
        .vop_open       = cd9660_open,
        .vop_close      = cd9660_close,
        .vop_access     = cd9660_access,
        .vop_getattr    = cd9660_getattr,
        .vop_setattr    = cd9660_setattr,
        .vop_read       = cd9660_read,
-       .vop_write      = cd9660_write,
+       .vop_write      = eopnotsupp,
        .vop_ioctl      = cd9660_ioctl,
        .vop_poll       = cd9660_poll,
        .vop_kqfilter   = cd9660_kqfilter,
-       .vop_revoke     = cd9660_revoke,
-       .vop_fsync      = cd9660_fsync,
-       .vop_remove     = cd9660_remove,
+       .vop_revoke     = vop_generic_revoke,
+       .vop_fsync      = nullop,
+       .vop_remove     = eopnotsupp,
        .vop_link       = cd9660_link,
-       .vop_rename     = cd9660_rename,
-       .vop_mkdir      = cd9660_mkdir,
-       .vop_rmdir      = cd9660_rmdir,
+       .vop_rename     = eopnotsupp,
+       .vop_mkdir      = eopnotsupp,
+       .vop_rmdir      = eopnotsupp,
        .vop_symlink    = cd9660_symlink,
        .vop_readdir    = cd9660_readdir,
        .vop_readlink   = cd9660_readlink,
@@ -862,8 +847,8 @@ const struct vops cd9660_vops = {
        .vop_print      = cd9660_print,
        .vop_islocked   = cd9660_islocked,
        .vop_pathconf   = cd9660_pathconf,
-       .vop_advlock    = cd9660_advlock,
-       .vop_bwrite     = vop_generic_bwrite
+       .vop_advlock    = eopnotsupp,
+       .vop_bwrite     = vop_generic_bwrite,
 };
 
 /* Special device vnode ops */
index a662a67..bce3f7b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: mfs_extern.h,v 1.20 2020/01/20 23:21:57 claudio Exp $ */
+/*     $OpenBSD: mfs_extern.h,v 1.21 2021/03/24 16:17:06 semarie Exp $ */
 /*     $NetBSD: mfs_extern.h,v 1.4 1996/02/09 22:31:27 christos Exp $  */
 
 /*-
@@ -61,6 +61,5 @@ int mfs_close(void *);
 int mfs_inactive(void *);
 int mfs_reclaim(void *);
 int mfs_print(void *);
-#define        mfs_revoke vop_generic_revoke
 int mfs_badop(void *);
 
index 00c0c24..0589b17 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: mfs_vnops.c,v 1.54 2020/05/21 09:35:09 mpi Exp $      */
+/*     $OpenBSD: mfs_vnops.c,v 1.55 2021/03/24 16:17:06 semarie Exp $  */
 /*     $NetBSD: mfs_vnops.c,v 1.8 1996/03/17 02:16:32 christos Exp $   */
 
 /*
@@ -61,7 +61,7 @@ const struct vops mfs_vops = {
         .vop_ioctl      = mfs_ioctl,
         .vop_poll       = mfs_badop,
         .vop_kqfilter   = mfs_badop,
-        .vop_revoke     = mfs_revoke,
+        .vop_revoke     = vop_generic_revoke,
         .vop_fsync      = spec_fsync,
         .vop_remove     = mfs_badop,
         .vop_link       = mfs_badop,