mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
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.
This commit is contained in:
parent
f0775d7c7a
commit
c96c1bebe3
1 changed files with 0 additions and 24 deletions
|
|
@ -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);
|
||||
|
|
@ -510,28 +509,6 @@ null_access(ap)
|
|||
return (null_bypass((struct vop_generic_args *)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,
|
||||
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Reference in a new issue