]> git.baikalelectronics.ru Git - kernel.git/commit
pipe: fix and clarify pipe read wakeup logic
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 7 Dec 2019 20:54:26 +0000 (12:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 7 Dec 2019 20:54:26 +0000 (12:54 -0800)
commit6eb42155d04be50a10c4688dc990aeadbc24b236
tree2c57def4070ff2e823f47db901b3dcfb87368981
parent5c213172f412dedbf68d8413c50d4c920219bd79
pipe: fix and clarify pipe read wakeup logic

This is the read side version of the previous commit: it simplifies the
logic to only wake up waiting writers when necessary, and makes sure to
use a synchronous wakeup.  This time not so much for GNU make jobserver
reasons (that pipe never fills up), but simply to get the writer going
quickly again.

A bit less verbose commentary this time, if only because I assume that
the write side commentary isn't going to be ignored if you touch this
code.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/pipe.c