summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/io_uring.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 6ddafa3af170..619c67fd456d 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5513,9 +5513,8 @@ static int io_poll_check_events(struct io_kiocb *req, bool locked)
unsigned flags = locked ? 0 : IO_URING_F_UNLOCKED;
if (unlikely(!io_assign_file(req, flags)))
- req->result = -EBADF;
- else
- req->result = vfs_poll(req->file, &pt) & poll->events;
+ return -EBADF;
+ req->result = vfs_poll(req->file, &pt) & poll->events;
}
/* multishot, just fill an CQE and proceed */