Revert "io_uring: disable polling pollfree files"

This reverts commit 28d8d2737e.

This breaks the Android api and for now, does not seem to be necessary
due to the lack of io_uring users in this kernel branch.  If io_uring
starts to be used more, it can be brought back in a ABI-safe way.

Bug: 161946584
Bug: 248008710
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2696bd5e1ad61d3ab0e8d06f4ffe46718bb05845
This commit is contained in:
Greg Kroah-Hartman 2022-09-22 13:22:44 +02:00
parent 5d60de7a5f
commit e4a7358455
4 changed files with 0 additions and 8 deletions

View File

@ -6197,7 +6197,6 @@ const struct file_operations binder_fops = {
.open = binder_open,
.flush = binder_flush,
.release = binder_release,
.may_pollfree = true,
};
DEFINE_SHOW_ATTRIBUTE(state);

View File

@ -5198,11 +5198,6 @@ static __poll_t __io_arm_poll_handler(struct io_kiocb *req,
struct io_ring_ctx *ctx = req->ctx;
bool cancel = false;
if (req->file->f_op->may_pollfree) {
spin_lock_irq(&ctx->completion_lock);
return -EOPNOTSUPP;
}
INIT_HLIST_NODE(&req->hash_node);
io_init_poll_iocb(poll, mask, wake_func);
poll->file = req->file;

View File

@ -248,7 +248,6 @@ static const struct file_operations signalfd_fops = {
.poll = signalfd_poll,
.read = signalfd_read,
.llseek = noop_llseek,
.may_pollfree = true,
};
static int do_signalfd4(int ufd, sigset_t *mask, int flags)

View File

@ -1893,7 +1893,6 @@ struct file_operations {
struct file *file_out, loff_t pos_out,
loff_t len, unsigned int remap_flags);
int (*fadvise)(struct file *, loff_t, loff_t, int);
bool may_pollfree;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);