Re: [PATCH] 9p/trans_fd: always use O_NONBLOCK read/write
From: Dominique Martinet <asmadeus@codewreck.org>
Date: 2022-10-07 01:04:29
From: Dominique Martinet <asmadeus@codewreck.org>
Date: 2022-10-07 01:04:29
Christian Schoenebeck wrote on Thu, Oct 06, 2022 at 04:55:23PM +0200:
quoted
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index e758978b44be..9870597da583 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c@@ -821,11 +821,13 @@ static int p9_fd_open(struct p9_client *client, intrfd, int wfd) goto out_free_ts; if (!(ts->rd->f_mode & FMODE_READ)) goto out_put_rd; + ts->rd->f_flags |= O_NONBLOCK;... I think this deserves a short comment like: /* prevent hung task with pipes */
Good point, I've sneaked in this comment:
/* prevent workers from hanging on IO when fd is a pipe */
https://github.com/martinetd/linux/commit/ef575281b21e9a34dfae544a187c6aac2ae424a9
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Thank you! -- Dominique