diff options
| author | Jens Axboe <[email protected]> | 2025-07-08 17:04:45 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-07-08 17:09:01 +0000 |
| commit | 9dff55ebaef7e94e5dedb6be28a1cafff65cc467 (patch) | |
| tree | bfc660724ad862401959ef0bf6d1bca3113ef228 /io_uring/io_uring.c | |
| parent | io_uring/msg_ring: ensure io_kiocb freeing is deferred for RCU (diff) | |
| download | kernel-9dff55ebaef7e94e5dedb6be28a1cafff65cc467.tar.gz kernel-9dff55ebaef7e94e5dedb6be28a1cafff65cc467.zip | |
Revert "io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well"
This reverts commit 6f11adcc6f36ffd8f33dbdf5f5ce073368975bc3.
The problematic commit was fixed in mainline, so the work-around in
io_uring can be removed at this point. Anonymous inodes no longer
pretend to be regular files after:
1e7ab6f67824 ("anon_inode: rework assertions")
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'io_uring/io_uring.c')
| -rw-r--r-- | io_uring/io_uring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 73648d26a622..5111ec040c53 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1666,12 +1666,11 @@ static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags) io_req_flags_t io_file_get_flags(struct file *file) { - struct inode *inode = file_inode(file); io_req_flags_t res = 0; BUILD_BUG_ON(REQ_F_ISREG_BIT != REQ_F_SUPPORT_NOWAIT_BIT + 1); - if (S_ISREG(inode->i_mode) && !(inode->i_flags & S_ANON_INODE)) + if (S_ISREG(file_inode(file)->i_mode)) res |= REQ_F_ISREG; if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT)) res |= REQ_F_SUPPORT_NOWAIT; |
