summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-05-14 02:41:14 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-05-14 02:41:14 +0000
commit442136505de1feaf366dc201ff43cff1ae0c88ef (patch)
tree6a6ce5e46069b47d97a501dcd2c738972dffacf7 /sys/kern/vfs_syscalls.c
parentffe26e8b25ca99e2231e7b7221e61f51da36d2fa (diff)
Remove the "vn_open() returning ENXIO means dup+close" hook that
was used by the now defunct portalfs. Zero out fd_ofileflags[fd] when allocating an fd instead of when releasing it. ok krw@ matthew@
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index edc88b4b69e..6ac0211eb36 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.182 2012/04/22 05:43:14 guenther Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.183 2012/05/14 02:41:13 guenther Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -869,10 +869,10 @@ doopenat(struct proc *p, int fd, const char *path, int oflags, mode_t mode,
flags &= ~O_TRUNC; /* Must do truncate ourselves */
}
if ((error = vn_open(&nd, flags, cmode)) != 0) {
- if ((error == ENODEV || error == ENXIO) &&
+ if (error == ENODEV &&
p->p_dupfd >= 0 && /* XXX from fdopen */
(error =
- dupfdopen(fdp, indx, p->p_dupfd, flags, error)) == 0) {
+ dupfdopen(fdp, indx, p->p_dupfd, flags)) == 0) {
closef(fp, p);
*retval = indx;
goto out;