From 60f0e34a8a63885ab5ef0d9e75647b1efcea9df2 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 26 Nov 2004 07:18:28 +0000 Subject: Eliminate null_open() and use instead null_bypass(). Null_open() was only here to handle MNT_NODEV, but since that does not affect any filesystems anymore, it could only have any effect if you nullfs mounted a devfs but didn't want devices to show up. If you need that, there are easier ways. --- sys/fs/nullfs/null_vnops.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'sys/fs/nullfs') diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index a755bbe..56406a1 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -201,7 +201,6 @@ static int null_inactive(struct vop_inactive_args *ap); static int null_islocked(struct vop_islocked_args *ap); static int null_lock(struct vop_lock_args *ap); static int null_lookup(struct vop_lookup_args *ap); -static int null_open(struct vop_open_args *ap); static int null_print(struct vop_print_args *ap); static int null_reclaim(struct vop_reclaim_args *ap); static int null_rename(struct vop_rename_args *ap); @@ -511,28 +510,6 @@ null_access(ap) } /* - * We must handle open to be able to catch MNT_NODEV and friends. - */ -static int -null_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; -{ - struct vnode *vp = ap->a_vp; - struct vnode *lvp = NULLVPTOLOWERVP(ap->a_vp); - - if ((vp->v_mount->mnt_flag & MNT_NODEV) && - (lvp->v_type == VBLK || lvp->v_type == VCHR)) - return ENXIO; - - return (null_bypass((struct vop_generic_args *)ap)); -} - -/* * We handle this to eliminate null FS to lower FS * file moving. Don't know why we don't allow this, * possibly we should. @@ -895,7 +872,6 @@ static struct vnodeopv_entry_desc null_vnodeop_entries[] = { { &vop_islocked_desc, (vop_t *) null_islocked }, { &vop_lock_desc, (vop_t *) null_lock }, { &vop_lookup_desc, (vop_t *) null_lookup }, - { &vop_open_desc, (vop_t *) null_open }, { &vop_print_desc, (vop_t *) null_print }, { &vop_reclaim_desc, (vop_t *) null_reclaim }, { &vop_rename_desc, (vop_t *) null_rename }, -- cgit v1.1