Commit df2e19a8 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: thread_with_stdio: fix spinning instead of exiting



bch2_stdio_redirect_vprintf() was missing a check for stdio->done, i.e.
exiting.

This caused the thread attempting to print to spin, and since it was
being called from the kthread ran by thread_with_stdio, the userspace
side hung as well.

Change it to return -EPIPE - i.e. writing to a pipe that's been closed.

Reported-by: default avatarJan Solanti <jhs@psonet.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 6846100b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment