summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/sys_pipe.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index c1e954679526..b58d3c64fa2d 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1559,13 +1559,8 @@ filt_pipedetach(struct knote *kn)
struct pipe *cpipe = (struct pipe *)kn->kn_fp->f_data;
PIPE_LOCK(cpipe);
- if (kn->kn_filter == EVFILT_WRITE) {
- if (!cpipe->pipe_peer->pipe_present) {
- PIPE_UNLOCK(cpipe);
- return;
- }
+ if (kn->kn_filter == EVFILT_WRITE)
cpipe = cpipe->pipe_peer;
- }
knlist_remove(&cpipe->pipe_sel.si_note, kn, 1);
PIPE_UNLOCK(cpipe);
}