Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/miscfs use former genfs_eopnotsupp_rele() as genfs_eopno...



details:   https://anonhg.NetBSD.org/src/rev/4a282ef874ec
branches:  trunk
changeset: 545559:4a282ef874ec
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Thu Apr 10 21:53:32 2003 +0000

description:
use former genfs_eopnotsupp_rele() as genfs_eopnotsupp(), so that vnodes
are vput()/vrele()d as necessary - some filesystems did use the wrong
one for some ops, and it's just safer to not take the chance

based on suggestion by Bill Studenmund

diffstat:

 sys/miscfs/fdesc/fdesc_vnops.c   |  16 ++++++++--------
 sys/miscfs/genfs/genfs.h         |   3 +--
 sys/miscfs/genfs/genfs_vnops.c   |  14 +++-----------
 sys/miscfs/kernfs/kernfs_vnops.c |  16 ++++++++--------
 sys/miscfs/portal/portal_vnops.c |  16 ++++++++--------
 sys/miscfs/procfs/procfs_vnops.c |  16 ++++++++--------
 6 files changed, 36 insertions(+), 45 deletions(-)

diffs (237 lines):

diff -r ff3541a6599a -r 4a282ef874ec sys/miscfs/fdesc/fdesc_vnops.c
--- a/sys/miscfs/fdesc/fdesc_vnops.c    Thu Apr 10 21:37:32 2003 +0000
+++ b/sys/miscfs/fdesc/fdesc_vnops.c    Thu Apr 10 21:53:32 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fdesc_vnops.c,v 1.73 2003/02/23 14:37:35 pk Exp $      */
+/*     $NetBSD: fdesc_vnops.c,v 1.74 2003/04/10 21:53:32 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.73 2003/02/23 14:37:35 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.74 2003/04/10 21:53:32 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,8 +89,8 @@
 u_long fdhash;
 
 int    fdesc_lookup    __P((void *));
-#define        fdesc_create    genfs_eopnotsupp_rele
-#define        fdesc_mknod     genfs_eopnotsupp_rele
+#define        fdesc_create    genfs_eopnotsupp
+#define        fdesc_mknod     genfs_eopnotsupp
 int    fdesc_open      __P((void *));
 #define        fdesc_close     genfs_nullop
 #define        fdesc_access    genfs_nullop
@@ -105,11 +105,11 @@
 #define        fdesc_fcntl     genfs_fcntl
 #define        fdesc_fsync     genfs_nullop
 #define        fdesc_seek      genfs_seek
-#define        fdesc_remove    genfs_eopnotsupp_rele
+#define        fdesc_remove    genfs_eopnotsupp
 int    fdesc_link      __P((void *));
-#define        fdesc_rename    genfs_eopnotsupp_rele
-#define        fdesc_mkdir     genfs_eopnotsupp_rele
-#define        fdesc_rmdir     genfs_eopnotsupp_rele
+#define        fdesc_rename    genfs_eopnotsupp
+#define        fdesc_mkdir     genfs_eopnotsupp
+#define        fdesc_rmdir     genfs_eopnotsupp
 int    fdesc_symlink   __P((void *));
 int    fdesc_readdir   __P((void *));
 int    fdesc_readlink  __P((void *));
diff -r ff3541a6599a -r 4a282ef874ec sys/miscfs/genfs/genfs.h
--- a/sys/miscfs/genfs/genfs.h  Thu Apr 10 21:37:32 2003 +0000
+++ b/sys/miscfs/genfs/genfs.h  Thu Apr 10 21:53:32 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfs.h,v 1.16 2002/10/23 09:14:36 jdolecek Exp $      */
+/*     $NetBSD: genfs.h,v 1.17 2003/04/10 21:53:32 jdolecek Exp $      */
 
 int    genfs_badop             __P((void *));
 int    genfs_nullop            __P((void *));
@@ -6,7 +6,6 @@
 int    genfs_enoextops         __P((void *));
 int    genfs_einval            __P((void *));
 int    genfs_eopnotsupp        __P((void *));
-int    genfs_eopnotsupp_rele   __P((void *));
 int    genfs_ebadf             __P((void *));
 int    genfs_nolock            __P((void *));
 int    genfs_noislocked        __P((void *));
diff -r ff3541a6599a -r 4a282ef874ec sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c    Thu Apr 10 21:37:32 2003 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c    Thu Apr 10 21:53:32 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfs_vnops.c,v 1.74 2003/04/10 21:34:12 jdolecek Exp $        */
+/*     $NetBSD: genfs_vnops.c,v 1.75 2003/04/10 21:53:33 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.74 2003/04/10 21:34:12 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.75 2003/04/10 21:53:33 jdolecek Exp $");
 
 #include "opt_nfsserver.h"
 
@@ -183,20 +183,12 @@
        return (EINVAL);
 }
 
-/*ARGSUSED*/
-int
-genfs_eopnotsupp(void *v)
-{
-
-       return (EOPNOTSUPP);
-}
-
 /*
  * Called when an fs doesn't support a particular vop.
  * This takes care to vrele, vput, or vunlock passed in vnodes.
  */
 int
-genfs_eopnotsupp_rele(void *v)
+genfs_eopnotsupp(void *v)
 {
        struct vop_generic_args /*
                struct vnodeop_desc *a_desc;
diff -r ff3541a6599a -r 4a282ef874ec sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c  Thu Apr 10 21:37:32 2003 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c  Thu Apr 10 21:53:32 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernfs_vnops.c,v 1.84 2002/10/12 14:04:45 jdolecek Exp $       */
+/*     $NetBSD: kernfs_vnops.c,v 1.85 2003/04/10 21:53:33 jdolecek Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.84 2002/10/12 14:04:45 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.85 2003/04/10 21:53:33 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -103,8 +103,8 @@
 static int nkern_targets = sizeof(kern_targets) / sizeof(kern_targets[0]);
 
 int    kernfs_lookup   __P((void *));
-#define        kernfs_create   genfs_eopnotsupp_rele
-#define        kernfs_mknod    genfs_eopnotsupp_rele
+#define        kernfs_create   genfs_eopnotsupp
+#define        kernfs_mknod    genfs_eopnotsupp
 #define        kernfs_open     genfs_nullop
 #define        kernfs_close    genfs_nullop
 int    kernfs_access   __P((void *));
@@ -118,11 +118,11 @@
 #define kernfs_revoke  genfs_revoke
 #define        kernfs_fsync    genfs_nullop
 #define        kernfs_seek     genfs_nullop
-#define        kernfs_remove   genfs_eopnotsupp_rele
+#define        kernfs_remove   genfs_eopnotsupp
 int    kernfs_link     __P((void *));
-#define        kernfs_rename   genfs_eopnotsupp_rele
-#define        kernfs_mkdir    genfs_eopnotsupp_rele
-#define        kernfs_rmdir    genfs_eopnotsupp_rele
+#define        kernfs_rename   genfs_eopnotsupp
+#define        kernfs_mkdir    genfs_eopnotsupp
+#define        kernfs_rmdir    genfs_eopnotsupp
 int    kernfs_symlink  __P((void *));
 int    kernfs_readdir  __P((void *));
 #define        kernfs_readlink genfs_eopnotsupp
diff -r ff3541a6599a -r 4a282ef874ec sys/miscfs/portal/portal_vnops.c
--- a/sys/miscfs/portal/portal_vnops.c  Thu Apr 10 21:37:32 2003 +0000
+++ b/sys/miscfs/portal/portal_vnops.c  Thu Apr 10 21:53:32 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: portal_vnops.c,v 1.44 2003/01/18 09:18:06 thorpej Exp $        */
+/*     $NetBSD: portal_vnops.c,v 1.45 2003/04/10 21:53:33 jdolecek Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: portal_vnops.c,v 1.44 2003/01/18 09:18:06 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: portal_vnops.c,v 1.45 2003/04/10 21:53:33 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -75,8 +75,8 @@
 static int     portal_connect __P((struct socket *, struct socket *));
 
 int    portal_lookup   __P((void *));
-#define        portal_create   genfs_eopnotsupp_rele
-#define        portal_mknod    genfs_eopnotsupp_rele
+#define        portal_create   genfs_eopnotsupp
+#define        portal_mknod    genfs_eopnotsupp
 int    portal_open     __P((void *));
 #define        portal_close    genfs_nullop
 #define        portal_access   genfs_nullop
@@ -90,11 +90,11 @@
 #define portal_revoke  genfs_revoke
 #define        portal_fsync    genfs_nullop
 #define        portal_seek     genfs_seek
-#define        portal_remove   genfs_eopnotsupp_rele
+#define        portal_remove   genfs_eopnotsupp
 int    portal_link     __P((void *));
-#define        portal_rename   genfs_eopnotsupp_rele
-#define        portal_mkdir    genfs_eopnotsupp_rele
-#define        portal_rmdir    genfs_eopnotsupp_rele
+#define        portal_rename   genfs_eopnotsupp
+#define        portal_mkdir    genfs_eopnotsupp
+#define        portal_rmdir    genfs_eopnotsupp
 int    portal_symlink  __P((void *));
 int    portal_readdir  __P((void *));
 #define        portal_readlink genfs_eopnotsupp
diff -r ff3541a6599a -r 4a282ef874ec sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c  Thu Apr 10 21:37:32 2003 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c  Thu Apr 10 21:53:32 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_vnops.c,v 1.95 2003/04/05 23:32:52 dsl Exp $    */
+/*     $NetBSD: procfs_vnops.c,v 1.96 2003/04/10 21:53:34 jdolecek Exp $       */
 
 /*
  * Copyright (c) 1993 Jan-Simon Pendry
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.95 2003/04/05 23:32:52 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.96 2003/04/10 21:53:34 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -128,8 +128,8 @@
     sizeof(proc_root_targets) / sizeof(proc_root_targets[0]);
 
 int    procfs_lookup   __P((void *));
-#define        procfs_create   genfs_eopnotsupp_rele
-#define        procfs_mknod    genfs_eopnotsupp_rele
+#define        procfs_create   genfs_eopnotsupp
+#define        procfs_mknod    genfs_eopnotsupp
 int    procfs_open     __P((void *));
 int    procfs_close    __P((void *));
 int    procfs_access   __P((void *));
@@ -143,11 +143,11 @@
 #define procfs_revoke  genfs_revoke
 #define        procfs_fsync    genfs_nullop
 #define        procfs_seek     genfs_nullop
-#define        procfs_remove   genfs_eopnotsupp_rele
+#define        procfs_remove   genfs_eopnotsupp
 int    procfs_link     __P((void *));
-#define        procfs_rename   genfs_eopnotsupp_rele
-#define        procfs_mkdir    genfs_eopnotsupp_rele
-#define        procfs_rmdir    genfs_eopnotsupp_rele
+#define        procfs_rename   genfs_eopnotsupp
+#define        procfs_mkdir    genfs_eopnotsupp
+#define        procfs_rmdir    genfs_eopnotsupp
 int    procfs_symlink  __P((void *));
 int    procfs_readdir  __P((void *));
 int    procfs_readlink __P((void *));



Home | Main Index | Thread Index | Old Index