mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
io_uring: unify files and task cancel
Now __io_uring_cancel() and __io_uring_files_cancel() are very similar and mostly differ by how we count requests, merge them and allow tctx_inflight() to handle counting. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/1a5986a97df4dc1378f3fe0ca1eb483dbcf42112.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
b303fe2e5a
commit
3f48cf18f8
2 changed files with 20 additions and 50 deletions
|
@ -7,19 +7,17 @@
|
|||
|
||||
#if defined(CONFIG_IO_URING)
|
||||
struct sock *io_uring_get_socket(struct file *file);
|
||||
void __io_uring_task_cancel(void);
|
||||
void __io_uring_files_cancel(struct files_struct *files);
|
||||
void __io_uring_cancel(struct files_struct *files);
|
||||
void __io_uring_free(struct task_struct *tsk);
|
||||
|
||||
static inline void io_uring_task_cancel(void)
|
||||
{
|
||||
if (current->io_uring)
|
||||
__io_uring_task_cancel();
|
||||
}
|
||||
static inline void io_uring_files_cancel(struct files_struct *files)
|
||||
{
|
||||
if (current->io_uring)
|
||||
__io_uring_files_cancel(files);
|
||||
__io_uring_cancel(files);
|
||||
}
|
||||
static inline void io_uring_task_cancel(void)
|
||||
{
|
||||
return io_uring_files_cancel(NULL);
|
||||
}
|
||||
static inline void io_uring_free(struct task_struct *tsk)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue