summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/io_uring.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index 03e52094630a..bb6492b66751 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -442,7 +442,7 @@ static inline bool io_file_can_poll(struct io_kiocb *req)
{
if (req->flags & REQ_F_CAN_POLL)
return true;
- if (file_can_poll(req->file)) {
+ if (req->file && file_can_poll(req->file)) {
req->flags |= REQ_F_CAN_POLL;
return true;
}