diff options
| author | 2018-05-08 09:03:58 +0000 | |
|---|---|---|
| committer | 2018-05-08 09:03:58 +0000 | |
| commit | 19ca50e9de34282694fd388af0327a6af8ca8dd2 (patch) | |
| tree | 9caed16d64469171445a1d7029adc0db812e5ef7 /sys/kern/kern_sysctl.c | |
| parent | Move the vfs stall "barrier" logic to a function. FREF() will soon (diff) | |
| download | wireguard-openbsd-19ca50e9de34282694fd388af0327a6af8ca8dd2.tar.xz wireguard-openbsd-19ca50e9de34282694fd388af0327a6af8ca8dd2.zip | |
Change fd_iterfile() to not return imature fps instead of skipping them
later.
ok bluhm@, visa@
Diffstat (limited to 'sys/kern/kern_sysctl.c')
| -rw-r--r-- | sys/kern/kern_sysctl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 3ac0efa3fdf..07d5e1f4c5e 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.334 2018/05/08 08:53:41 mpi Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.335 2018/05/08 09:03:58 mpi Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -1322,9 +1322,7 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep, } fp = NULL; while ((fp = fd_iterfile(fp, p)) != NULL) { - if (fp->f_count > 1 && /* 0, +1 for our FREF() */ - FILE_IS_USABLE(fp) && - (arg == 0 || fp->f_type == arg)) { + if ((arg == 0 || fp->f_type == arg)) { int af, skip = 0; if (arg == DTYPE_SOCKET && fp->f_type == arg) { af = ((struct socket *)fp->f_data)-> |
