aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/fs/deadfs/dead_vnops.c11
-rw-r--r--sys/kern/vfs_vnops.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/sys/fs/deadfs/dead_vnops.c b/sys/fs/deadfs/dead_vnops.c
index 09c3c996ee0e..324bbafd7caf 100644
--- a/sys/fs/deadfs/dead_vnops.c
+++ b/sys/fs/deadfs/dead_vnops.c
@@ -45,6 +45,7 @@
*/
static vop_lookup_t dead_lookup;
static vop_open_t dead_open;
+static vop_close_t dead_close;
static vop_getwritemount_t dead_getwritemount;
static vop_rename_t dead_rename;
static vop_unset_text_t dead_unset_text;
@@ -55,6 +56,7 @@ struct vop_vector dead_vnodeops = {
.vop_access = VOP_EBADF,
.vop_advlock = VOP_EBADF,
.vop_bmap = VOP_EBADF,
+ .vop_close = dead_close,
.vop_create = VOP_PANIC,
.vop_getattr = VOP_EBADF,
.vop_getwritemount = dead_getwritemount,
@@ -104,13 +106,18 @@ dead_lookup(struct vop_lookup_args *ap)
}
/*
- * Open always fails as if device did not exist.
+ * Silently succeed open and close.
*/
static int
dead_open(struct vop_open_args *ap)
{
+ return (0);
+}
- return (ENXIO);
+static int
+dead_close(struct vop_close_args *ap)
+{
+ return (0);
}
int
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 6c6727c7f372..f70bcdab4208 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -356,8 +356,6 @@ vn_open_vnode_advlock(struct vnode *vp, int fmode, struct file *fp)
fp->f_flag |= FHASLOCK;
vn_lock(vp, lock_flags | LK_RETRY);
- if (error == 0 && VN_IS_DOOMED(vp))
- error = ENOENT;
return (error);
}