io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Queston about io_uring_flush
@ 2021-02-04  9:31 Hao Xu
  2021-02-04 11:00 ` Pavel Begunkov
  0 siblings, 1 reply; 4+ messages in thread
From: Hao Xu @ 2021-02-04  9:31 UTC (permalink / raw)
  To: io-uring, Jens Axboe; +Cc: Pavel Begunkov

Hi all,
Sorry for disturb all of you. Here comes my question.
When we close a uring file, we go into io_uring_flush(),
there is codes at the end:

if (!(ctx->flags & IORING_SETUP_SQPOLL) || ctx->sqo_task == current)
    io_uring_del_task_file(file);

My understanding, this is to delete the ctx(associated with the uring
file) from current->io_uring->xa.
I'm thinking of this scenario: the task to close uring file is not the
one which created the uring file.
Then it doesn't make sense to delete the uring file from 
current->io_uring->xa. It should be "delete uring file from
ctx->sqo_task->io_uring->xa" instead.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-05 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04  9:31 Queston about io_uring_flush Hao Xu
2021-02-04 11:00 ` Pavel Begunkov
2021-02-05  7:21   ` Hao Xu
2021-02-05  9:56     ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).