Re: [PATCH RFC v7 14/16] fuse: {uring} Handle IO_URING_F_TASK_DEAD

Pavel Begunkov
2024-12-03T12:19:51Z

On 11/27/24 13:40, Bernd Schubert wrote:
> The ring task is terminating, it not safe to still access
> its resources. Also no need for further actions.
>
> Signed-off-by: Bernd Schubert <bschubert@ddn.com>
> ---
> fs/fuse/dev_uring.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
> index 66addb5d00c36d84a0d8d1f470f5ae10d8ee3f6f..94dc3f56d4ab604eb4b87d3b9731567e3a214b0a 100644
> --- a/fs/fuse/dev_uring.c
> +++ b/fs/fuse/dev_uring.c
> @@ -1056,16 +1056,22 @@ fuse_uring_send_req_in_task(struct io_uring_cmd *cmd,
>
> BUILD_BUG_ON(sizeof(pdu) > sizeof(cmd->pdu));
>
> + if (unlikely(issue_flags & IO_URING_F_TASK_DEAD)) {
> + err = -ECANCELED;
> + goto terminating;
> + }

Can you just fix up the patch that added the function? Patch 11, I
assume. No need to keep a bug for a couple of commits when you can
avoid introducing it in the first place.

--
Pavel Begunkov