Skip to content

Commit 3f00838

Browse files
isilenceaxboe
authored andcommitted
io_uring: kill fasync
We have never supported fasync properly, it would only fire when there is something polling io_uring making it useless. The original support came in through the initial io_uring merge for 5.1. Since it's broken and nobody has reported it, get rid of the fasync bits. Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/2f7ca3d344d406d34fa6713824198915c41cea86.1633080236.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 78f8876 commit 3f00838

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

fs/io_uring.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ struct io_ring_ctx {
403403
struct wait_queue_head cq_wait;
404404
unsigned cq_extra;
405405
atomic_t cq_timeouts;
406-
struct fasync_struct *cq_fasync;
407406
unsigned cq_last_tm_flush;
408407
} ____cacheline_aligned_in_smp;
409408

@@ -1614,10 +1613,8 @@ static void io_cqring_ev_posted(struct io_ring_ctx *ctx)
16141613
wake_up(&ctx->sq_data->wait);
16151614
if (io_should_trigger_evfd(ctx))
16161615
eventfd_signal(ctx->cq_ev_fd, 1);
1617-
if (waitqueue_active(&ctx->poll_wait)) {
1616+
if (waitqueue_active(&ctx->poll_wait))
16181617
wake_up_interruptible(&ctx->poll_wait);
1619-
kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
1620-
}
16211618
}
16221619

16231620
static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
@@ -1631,10 +1628,8 @@ static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
16311628
}
16321629
if (io_should_trigger_evfd(ctx))
16331630
eventfd_signal(ctx->cq_ev_fd, 1);
1634-
if (waitqueue_active(&ctx->poll_wait)) {
1631+
if (waitqueue_active(&ctx->poll_wait))
16351632
wake_up_interruptible(&ctx->poll_wait);
1636-
kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
1637-
}
16381633
}
16391634

16401635
/* Returns true if there are no backlogged entries after the flush */
@@ -9345,13 +9340,6 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
93459340
return mask;
93469341
}
93479342

9348-
static int io_uring_fasync(int fd, struct file *file, int on)
9349-
{
9350-
struct io_ring_ctx *ctx = file->private_data;
9351-
9352-
return fasync_helper(fd, file, on, &ctx->cq_fasync);
9353-
}
9354-
93559343
static int io_unregister_personality(struct io_ring_ctx *ctx, unsigned id)
93569344
{
93579345
const struct cred *creds;
@@ -10145,7 +10133,6 @@ static const struct file_operations io_uring_fops = {
1014510133
.mmap_capabilities = io_uring_nommu_mmap_capabilities,
1014610134
#endif
1014710135
.poll = io_uring_poll,
10148-
.fasync = io_uring_fasync,
1014910136
#ifdef CONFIG_PROC_FS
1015010137
.show_fdinfo = io_uring_show_fdinfo,
1015110138
#endif

0 commit comments

Comments
 (0)