public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Pavel Begunkov <asml.silence@gmail.com>,
	Jens Axboe <axboe@kernel.dk>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.14 29/30] io_uring: kill fasync
Date: Thu, 14 Oct 2021 16:54:34 +0200	[thread overview]
Message-ID: <20211014145210.479142033@linuxfoundation.org> (raw)
In-Reply-To: <20211014145209.520017940@linuxfoundation.org>

From: Pavel Begunkov <asml.silence@gmail.com>

[ Upstream commit 3f008385d46d3cea4a097d2615cd485f2184ba26 ]

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 <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/2f7ca3d344d406d34fa6713824198915c41cea86.1633080236.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/io_uring.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 675216f7022d..2f79586c1a7c 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -419,7 +419,6 @@ struct io_ring_ctx {
 		struct wait_queue_head	cq_wait;
 		unsigned		cq_extra;
 		atomic_t		cq_timeouts;
-		struct fasync_struct	*cq_fasync;
 		unsigned		cq_last_tm_flush;
 	} ____cacheline_aligned_in_smp;
 
@@ -1448,10 +1447,8 @@ static void io_cqring_ev_posted(struct io_ring_ctx *ctx)
 		wake_up(&ctx->sq_data->wait);
 	if (io_should_trigger_evfd(ctx))
 		eventfd_signal(ctx->cq_ev_fd, 1);
-	if (waitqueue_active(&ctx->poll_wait)) {
+	if (waitqueue_active(&ctx->poll_wait))
 		wake_up_interruptible(&ctx->poll_wait);
-		kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
-	}
 }
 
 static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
@@ -1465,10 +1462,8 @@ static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
 	}
 	if (io_should_trigger_evfd(ctx))
 		eventfd_signal(ctx->cq_ev_fd, 1);
-	if (waitqueue_active(&ctx->poll_wait)) {
+	if (waitqueue_active(&ctx->poll_wait))
 		wake_up_interruptible(&ctx->poll_wait);
-		kill_fasync(&ctx->cq_fasync, SIGIO, POLL_IN);
-	}
 }
 
 /* Returns true if there are no backlogged entries after the flush */
@@ -8779,13 +8774,6 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
 	return mask;
 }
 
-static int io_uring_fasync(int fd, struct file *file, int on)
-{
-	struct io_ring_ctx *ctx = file->private_data;
-
-	return fasync_helper(fd, file, on, &ctx->cq_fasync);
-}
-
 static int io_unregister_personality(struct io_ring_ctx *ctx, unsigned id)
 {
 	const struct cred *creds;
@@ -9571,7 +9559,6 @@ static const struct file_operations io_uring_fops = {
 	.mmap_capabilities = io_uring_nommu_mmap_capabilities,
 #endif
 	.poll		= io_uring_poll,
-	.fasync		= io_uring_fasync,
 #ifdef CONFIG_PROC_FS
 	.show_fdinfo	= io_uring_show_fdinfo,
 #endif
-- 
2.33.0




  parent reply	other threads:[~2021-10-14 15:06 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 14:54 [PATCH 5.14 00/30] 5.14.13-rc1 review Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 01/30] ext4: check and update i_disksize properly Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 02/30] ext4: correct the error path of ext4_write_inline_data_end() Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 03/30] ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 04/30] ALSA: oxfw: fix transmission method for Loud models based on OXFW971 Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 05/30] interconnect: qcom: sdm660: Add missing a2noc qos clocks Greg Kroah-Hartman
2021-10-15 11:24   ` Georgi Djakov
2021-10-15 11:31     ` Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 06/30] ALSA: usb-audio: Unify mixer resume and reset_resume procedure Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 07/30] HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 08/30] netfilter: ip6_tables: zero-initialize fragment offset Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 09/30] HID: wacom: Add new Intuos BT (CTL-4100WL/CTL-6100WL) device IDs Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 10/30] ASoC: SOF: loader: release_firmware() on load failure to avoid batching Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 11/30] KVM: arm64: nvhe: Fix missing FORCE for hyp-reloc.S build rule Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 12/30] netfilter: nf_nat_masquerade: make async masq_inet6_event handling generic Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 13/30] netfilter: nf_nat_masquerade: defer conntrack walk to work queue Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 14/30] mac80211: Drop frames from invalid MAC address in ad-hoc mode Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 15/30] pinctrl: qcom: sc7280: Add PM suspend callbacks Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 16/30] m68k: Handle arrivals of multiple signals correctly Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 17/30] hwmon: (ltc2947) Properly handle errors when looking for the external clock Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 18/30] net: prevent user from passing illegal stab size Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 19/30] mac80211: check return value of rhashtable_init Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 20/30] net: bgmac-platform: handle mac-address deferral Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 21/30] vboxfs: fix broken legacy mount signature checking Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 22/30] net: sun: SUNVNET_COMMON should depend on INET Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 23/30] drm/amdgpu: fix gart.bo pin_count leak Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 24/30] scsi: ses: Fix unsigned comparison with less than zero Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 25/30] scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported" Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 26/30] scsi: qla2xxx: Fix excessive messages during device logout Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 27/30] perf/core: fix userpage->time_enabled of inactive events Greg Kroah-Hartman
2021-10-14 14:54 ` [PATCH 5.14 28/30] sched: Always inline is_percpu_thread() Greg Kroah-Hartman
2021-10-14 14:54 ` Greg Kroah-Hartman [this message]
2021-10-14 14:54 ` [PATCH 5.14 30/30] hwmon: (pmbus/ibm-cffps) max_power_out swap changes Greg Kroah-Hartman
2021-10-14 20:24 ` [PATCH 5.14 00/30] 5.14.13-rc1 review Fox Chen
2021-10-14 22:23 ` Florian Fainelli
2021-10-14 22:38 ` Shuah Khan
2021-10-15 15:48 ` Daniel Díaz
2021-10-15 20:24 ` Justin Forbes
2021-10-15 22:07 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211014145210.479142033@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox