summaryrefslogtreecommitdiffstats
path: root/sys/fs/nullfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-11-26 07:18:28 +0000
committerphk <phk@FreeBSD.org>2004-11-26 07:18:28 +0000
commit60f0e34a8a63885ab5ef0d9e75647b1efcea9df2 (patch)
tree4634847c9336794df2df029e5e5e96ccbe27674e /sys/fs/nullfs
parentf5fa0d9a9a2e502d3a8241dc25c21273999dd88b (diff)
downloadFreeBSD-src-60f0e34a8a63885ab5ef0d9e75647b1efcea9df2.zip
FreeBSD-src-60f0e34a8a63885ab5ef0d9e75647b1efcea9df2.tar.gz
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.
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r--sys/fs/nullfs/null_vnops.c24
1 files changed, 0 insertions, 24 deletions
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 },
OpenPOWER on IntegriCloud