diff options
author | phk <phk@FreeBSD.org> | 2000-08-18 10:01:02 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-08-18 10:01:02 +0000 |
commit | 6dde24da5e3901df2e177767ae7d374fb70262ff (patch) | |
tree | 77f7a89259a726e581b2faa5b096de547743ccfb /sys/miscfs | |
parent | c641580eb1aaa15d6571b77d05a257a87ad133f6 (diff) | |
download | FreeBSD-src-6dde24da5e3901df2e177767ae7d374fb70262ff.zip FreeBSD-src-6dde24da5e3901df2e177767ae7d374fb70262ff.tar.gz |
Introduce vop_stdinactive() and make it the default if no vop_inactive
is declared.
Sort and prune a few vop_op[].
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/devfs/devfs_vnops.c | 17 | ||||
-rw-r--r-- | sys/miscfs/fifofs/fifo_vnops.c | 16 | ||||
-rw-r--r-- | sys/miscfs/portal/portal_vnops.c | 14 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 24 | ||||
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 16 |
5 files changed, 2 insertions, 85 deletions
diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index c708501..9a9c120 100644 --- a/sys/miscfs/devfs/devfs_vnops.c +++ b/sys/miscfs/devfs/devfs_vnops.c @@ -1532,21 +1532,6 @@ loop: splx(s); return (0); } -/* - * - * struct vop_inactive_args { - * struct vnode *a_vp; - * struct proc *a_p; - * } - */ - -static int -devfs_inactive(struct vop_inactive_args *ap) -{ - - VOP_UNLOCK(ap->a_vp, 0, ap->a_p); - return (0); -} /* * Just call the device strategy routine @@ -1964,7 +1949,6 @@ static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = { { &vop_access_desc, (vop_t *) devfs_access }, { &vop_bmap_desc, (vop_t *) devfs_badop }, { &vop_getattr_desc, (vop_t *) devfs_getattr }, - { &vop_inactive_desc, (vop_t *) devfs_inactive }, { &vop_link_desc, (vop_t *) devfs_link }, { &vop_lookup_desc, (vop_t *) devfs_lookup }, { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, @@ -1999,7 +1983,6 @@ static struct vnodeopv_entry_desc devfs_spec_vnodeop_entries[] = { { &vop_fsync_desc, (vop_t *) devfs_fsync }, { &vop_getattr_desc, (vop_t *) devfs_getattr }, { &vop_getpages_desc, (vop_t *) devfs_getpages }, - { &vop_inactive_desc, (vop_t *) devfs_inactive }, { &vop_ioctl_desc, (vop_t *) devfs_ioctl }, { &vop_lease_desc, (vop_t *) vop_null }, { &vop_link_desc, (vop_t *) devfs_badop }, diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index 03e3e37..453f207 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -71,7 +71,6 @@ static int fifo_read __P((struct vop_read_args *)); static int fifo_write __P((struct vop_write_args *)); static int fifo_ioctl __P((struct vop_ioctl_args *)); static int fifo_poll __P((struct vop_poll_args *)); -static int fifo_inactive __P((struct vop_inactive_args *)); static int fifo_bmap __P((struct vop_bmap_args *)); static int fifo_pathconf __P((struct vop_pathconf_args *)); static int fifo_advlock __P((struct vop_advlock_args *)); @@ -97,7 +96,7 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { { &vop_close_desc, (vop_t *) fifo_close }, { &vop_create_desc, (vop_t *) fifo_badop }, { &vop_getattr_desc, (vop_t *) vop_ebadf }, - { &vop_inactive_desc, (vop_t *) fifo_inactive }, + { &vop_getwritemount_desc, (vop_t *) vop_stdgetwritemount }, { &vop_ioctl_desc, (vop_t *) fifo_ioctl }, { &vop_lease_desc, (vop_t *) vop_null }, { &vop_link_desc, (vop_t *) fifo_badop }, @@ -107,7 +106,6 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { { &vop_open_desc, (vop_t *) fifo_open }, { &vop_pathconf_desc, (vop_t *) fifo_pathconf }, { &vop_poll_desc, (vop_t *) fifo_poll }, - { &vop_getwritemount_desc, (vop_t *) vop_stdgetwritemount }, { &vop_print_desc, (vop_t *) fifo_print }, { &vop_read_desc, (vop_t *) fifo_read }, { &vop_readdir_desc, (vop_t *) fifo_badop }, @@ -458,18 +456,6 @@ fifo_poll(ap) return (revents); } -static int -fifo_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - struct proc *a_p; - } */ *ap; -{ - - VOP_UNLOCK(ap->a_vp, 0, ap->a_p); - return (0); -} - /* * This is a noop, simply returning what one has been given. */ diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c index d4146da..621059a 100644 --- a/sys/miscfs/portal/portal_vnops.c +++ b/sys/miscfs/portal/portal_vnops.c @@ -69,7 +69,6 @@ static int portal_badop __P((void)); static void portal_closefd __P((struct proc *p, int fd)); static int portal_connect __P((struct socket *so, struct socket *so2)); static int portal_getattr __P((struct vop_getattr_args *ap)); -static int portal_inactive __P((struct vop_inactive_args *ap)); static int portal_lookup __P((struct vop_lookup_args *ap)); static int portal_open __P((struct vop_open_args *ap)); static int portal_print __P((struct vop_print_args *ap)); @@ -527,18 +526,6 @@ portal_readdir(ap) } static int -portal_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - struct proc *a_p; - } */ *ap; -{ - - VOP_UNLOCK(ap->a_vp, 0, ap->a_p); - return (0); -} - -static int portal_reclaim(ap) struct vop_reclaim_args /* { struct vnode *a_vp; @@ -590,7 +577,6 @@ static struct vnodeopv_entry_desc portal_vnodeop_entries[] = { { &vop_access_desc, (vop_t *) vop_null }, { &vop_bmap_desc, (vop_t *) portal_badop }, { &vop_getattr_desc, (vop_t *) portal_getattr }, - { &vop_inactive_desc, (vop_t *) portal_inactive }, { &vop_lookup_desc, (vop_t *) portal_lookup }, { &vop_open_desc, (vop_t *) portal_open }, { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 0d72522..35b3afb 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -67,7 +67,6 @@ static int procfs_badop __P((void)); static int procfs_bmap __P((struct vop_bmap_args *)); static int procfs_close __P((struct vop_close_args *)); static int procfs_getattr __P((struct vop_getattr_args *)); -static int procfs_inactive __P((struct vop_inactive_args *)); static int procfs_ioctl __P((struct vop_ioctl_args *)); static int procfs_lookup __P((struct vop_lookup_args *)); static int procfs_open __P((struct vop_open_args *)); @@ -336,28 +335,6 @@ procfs_bmap(ap) } /* - * procfs_inactive is called when the pfsnode - * is vrele'd and the reference count goes - * to zero. (vp) will be on the vnode free - * list, so to get it back vget() must be - * used. - * - * (vp) is locked on entry, but must be unlocked on exit. - */ -static int -procfs_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - } */ *ap; -{ - struct vnode *vp = ap->a_vp; - - VOP_UNLOCK(vp, 0, ap->a_p); - - return (0); -} - -/* * _reclaim is called when getnewvnode() * wants to make use of an entry on the vnode * free list. at this time the filesystem needs @@ -1014,7 +991,6 @@ static struct vnodeopv_entry_desc procfs_vnodeop_entries[] = { { &vop_close_desc, (vop_t *) procfs_close }, { &vop_create_desc, (vop_t *) procfs_badop }, { &vop_getattr_desc, (vop_t *) procfs_getattr }, - { &vop_inactive_desc, (vop_t *) procfs_inactive }, { &vop_link_desc, (vop_t *) procfs_badop }, { &vop_lookup_desc, (vop_t *) procfs_lookup }, { &vop_mkdir_desc, (vop_t *) procfs_badop }, diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 2b1df9e..f6bd853 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -59,7 +59,6 @@ static int spec_close __P((struct vop_close_args *)); static int spec_freeblks __P((struct vop_freeblks_args *)); static int spec_fsync __P((struct vop_fsync_args *)); static int spec_getpages __P((struct vop_getpages_args *)); -static int spec_inactive __P((struct vop_inactive_args *)); static int spec_ioctl __P((struct vop_ioctl_args *)); static int spec_open __P((struct vop_open_args *)); static int spec_poll __P((struct vop_poll_args *)); @@ -79,7 +78,7 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = { { &vop_freeblks_desc, (vop_t *) spec_freeblks }, { &vop_fsync_desc, (vop_t *) spec_fsync }, { &vop_getpages_desc, (vop_t *) spec_getpages }, - { &vop_inactive_desc, (vop_t *) spec_inactive }, + { &vop_getwritemount_desc, (vop_t *) vop_stdgetwritemount }, { &vop_ioctl_desc, (vop_t *) spec_ioctl }, { &vop_lease_desc, (vop_t *) vop_null }, { &vop_link_desc, (vop_t *) vop_panic }, @@ -88,7 +87,6 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = { { &vop_open_desc, (vop_t *) spec_open }, { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_poll_desc, (vop_t *) spec_poll }, - { &vop_getwritemount_desc, (vop_t *) vop_stdgetwritemount }, { &vop_print_desc, (vop_t *) spec_print }, { &vop_read_desc, (vop_t *) spec_read }, { &vop_readdir_desc, (vop_t *) vop_panic }, @@ -391,18 +389,6 @@ loop: return (0); } -static int -spec_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - struct proc *a_p; - } */ *ap; -{ - - VOP_UNLOCK(ap->a_vp, 0, ap->a_p); - return (0); -} - /* * Just call the device strategy routine */ |