diff options
-rw-r--r-- | sys/kern/uipc_socket.c | 8 | ||||
-rw-r--r-- | sys/miscfs/fifofs/fifo_vnops.c | 7 | ||||
-rw-r--r-- | sys/sys/socketvar.h | 9 | ||||
-rw-r--r-- | usr.bin/netstat/inet.c | 3 |
4 files changed, 6 insertions, 21 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index bf9ecaff692..b629ba7c28f 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.253 2021/01/09 15:30:38 bluhm Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.254 2021/01/17 05:23:34 visa Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -2040,7 +2040,6 @@ soo_kqfilter(struct file *fp, struct knote *kn) } klist_insert_locked(&sb->sb_sel.si_note, kn); - sb->sb_flagsintr |= SB_KNOTE; return (0); } @@ -2053,8 +2052,6 @@ filt_sordetach(struct knote *kn) KERNEL_ASSERT_LOCKED(); klist_remove_locked(&so->so_rcv.sb_sel.si_note, kn); - if (klist_empty(&so->so_rcv.sb_sel.si_note)) - so->so_rcv.sb_flagsintr &= ~SB_KNOTE; } int @@ -2106,8 +2103,6 @@ filt_sowdetach(struct knote *kn) KERNEL_ASSERT_LOCKED(); klist_remove_locked(&so->so_snd.sb_sel.si_note, kn); - if (klist_empty(&so->so_snd.sb_sel.si_note)) - so->so_snd.sb_flagsintr &= ~SB_KNOTE; } int @@ -2178,7 +2173,6 @@ sobuf_print(struct sockbuf *sb, (*pr)("\tsb_mbtail: %p\n", sb->sb_mbtail); (*pr)("\tsb_lastrecord: %p\n", sb->sb_lastrecord); (*pr)("\tsb_sel: ...\n"); - (*pr)("\tsb_flagsintr: %d\n", sb->sb_flagsintr); (*pr)("\tsb_flags: %i\n", sb->sb_flags); (*pr)("\tsb_timeo_nsecs: %llu\n", sb->sb_timeo_nsecs); } diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index e8150dd0d45..4ce35cfc03b 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fifo_vnops.c,v 1.78 2020/12/25 12:59:52 visa Exp $ */ +/* $OpenBSD: fifo_vnops.c,v 1.79 2021/01/17 05:23:34 visa Exp $ */ /* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */ /* @@ -533,7 +533,6 @@ fifo_kqfilter(void *v) ap->a_kn->kn_hook = so; klist_insert_locked(&sb->sb_sel.si_note, ap->a_kn); - sb->sb_flagsintr |= SB_KNOTE; return (0); } @@ -544,8 +543,6 @@ filt_fifordetach(struct knote *kn) struct socket *so = (struct socket *)kn->kn_hook; klist_remove_locked(&so->so_rcv.sb_sel.si_note, kn); - if (klist_empty(&so->so_rcv.sb_sel.si_note)) - so->so_rcv.sb_flagsintr &= ~SB_KNOTE; } int @@ -580,8 +577,6 @@ filt_fifowdetach(struct knote *kn) struct socket *so = (struct socket *)kn->kn_hook; klist_remove_locked(&so->so_snd.sb_sel.si_note, kn); - if (klist_empty(&so->so_snd.sb_sel.si_note)) - so->so_snd.sb_flagsintr &= ~SB_KNOTE; } int diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index abcf20ed54d..c5c1b448926 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: socketvar.h,v 1.91 2020/01/15 13:17:35 mpi Exp $ */ +/* $OpenBSD: socketvar.h,v 1.92 2021/01/17 05:23:34 visa Exp $ */ /* $NetBSD: socketvar.h,v 1.18 1996/02/09 18:25:38 christos Exp $ */ /*- @@ -113,7 +113,6 @@ struct socket { short sb_flags; /* flags, see below */ /* End area that is zeroed on flush. */ #define sb_endzero sb_flags - int sb_flagsintr; /* flags, changed atomically */ uint64_t sb_timeo_nsecs;/* timeout for read/write */ struct selinfo sb_sel; /* process selecting read/write */ } so_rcv, so_snd; @@ -125,7 +124,6 @@ struct socket { #define SB_ASYNC 0x10 /* ASYNC I/O, need signals */ #define SB_SPLICE 0x20 /* buffer is splice source or drain */ #define SB_NOINTR 0x40 /* operations not interruptible */ -#define SB_KNOTE 0x80 /* kernel note attached */ void (*so_upcall)(struct socket *so, caddr_t arg, int waitf); caddr_t so_upcallarg; /* Arg for above */ @@ -177,11 +175,10 @@ void soassertlocked(struct socket *); static inline int sb_notify(struct socket *so, struct sockbuf *sb) { - int flags = (sb->sb_flags | sb->sb_flagsintr); - KASSERT(sb == &so->so_rcv || sb == &so->so_snd); soassertlocked(so); - return ((flags & (SB_WAIT|SB_SEL|SB_ASYNC|SB_SPLICE|SB_KNOTE)) != 0); + return ((sb->sb_flags & (SB_WAIT|SB_SEL|SB_ASYNC|SB_SPLICE)) != 0 || + !klist_empty(&sb->sb_sel.si_note)); } /* diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 2e2a672d2ab..c6ec841e82a 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.169 2020/12/23 22:20:18 bluhm Exp $ */ +/* $OpenBSD: inet.c,v 1.170 2021/01/17 05:23:34 visa Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -1378,7 +1378,6 @@ sockbuf_dump(struct sockbuf *sb, const char *name) p("%lu", sb_mbmax, ", "); p("%ld", sb_lowat, "\n "); printf("%s ", name); - p("%#.8x", sb_flagsintr, ", "); p("%#.4x", sb_flags, ", "); p("%llu", sb_timeo_nsecs, "\n "); #undef p |