Module Name: src
Committed By: mlelstv
Date: Sat Jul 3 09:39:26 UTC 2021
Modified Files:
src/sys/kern: vfs_syscalls.c
Log Message:
Return error from fd_dupopen.
To generate a diff of this commit:
cvs rdiff -u -r1.550 -r1.551 src/sys/kern/vfs_syscalls.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.550 src/sys/kern/vfs_syscalls.c:1.551
--- src/sys/kern/vfs_syscalls.c:1.550 Tue Jun 29 22:40:53 2021
+++ src/sys/kern/vfs_syscalls.c Sat Jul 3 09:39:26 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls.c,v 1.550 2021/06/29 22:40:53 dholland Exp $ */
+/* $NetBSD: vfs_syscalls.c,v 1.551 2021/07/03 09:39:26 mlelstv Exp $ */
/*-
* Copyright (c) 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.550 2021/06/29 22:40:53 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.551 2021/07/03 09:39:26 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_fileassoc.h"
@@ -1674,10 +1674,9 @@ do_open(lwp_t *l, struct vnode *dvp, str
if (vp == NULL) {
fd_abort(p, fp, indx);
error = fd_dupopen(dupfd, dupfd_move, flags, &indx);
- if (error == 0) {
- *fd = indx;
- return 0;
- }
+ if (error)
+ return error;
+ *fd = indx;
} else {
error = open_setfp(l, fp, vp, indx, flags);
if (error)