From 6dde24da5e3901df2e177767ae7d374fb70262ff Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 18 Aug 2000 10:01:02 +0000 Subject: Introduce vop_stdinactive() and make it the default if no vop_inactive is declared. Sort and prune a few vop_op[]. --- sys/fs/fifofs/fifo_vnops.c | 16 +--------------- sys/fs/portalfs/portal_vnops.c | 14 -------------- sys/fs/procfs/procfs_vnops.c | 24 ------------------------ sys/fs/specfs/spec_vnops.c | 16 +--------------- 4 files changed, 2 insertions(+), 68 deletions(-) (limited to 'sys/fs') diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index 03e3e37..453f207 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/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/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c index d4146da..621059a 100644 --- a/sys/fs/portalfs/portal_vnops.c +++ b/sys/fs/portalfs/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/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 0d72522..35b3afb 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/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/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 2b1df9e..f6bd853 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/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 */ -- cgit v1.1