summaryrefslogtreecommitdiffstats
path: root/io_uring/io_uring.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-20 13:32:32 +0200
committerJens Axboe <axboe@kernel.dk>2023-06-20 17:36:22 +0200
commit8487f083c6ff6e02b2ec14f22ef2b0079a1b6425 (patch)
treed6ead3cfb5f4ab86634ead614fdb71436fc43f4d /io_uring/io_uring.c
parentio_uring: remove io_req_ffs_set (diff)
downloadlinux-8487f083c6ff6e02b2ec14f22ef2b0079a1b6425.tar.xz
linux-8487f083c6ff6e02b2ec14f22ef2b0079a1b6425.zip
io_uring: return REQ_F_ flags from io_file_get_flags
Two of the three callers want them, so return the more usual format, and shift into the FFS_ form only for the fixed file table. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20230620113235.920399-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r--io_uring/io_uring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 0e0bdb6ac9a2..1f348753694b 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -425,7 +425,7 @@ static void io_prep_async_work(struct io_kiocb *req)
req->work.flags |= IO_WQ_WORK_CONCURRENT;
if (req->file && !(req->flags & REQ_F_FIXED_FILE))
- req->flags |= io_file_get_flags(req->file) << REQ_F_SUPPORT_NOWAIT_BIT;
+ req->flags |= io_file_get_flags(req->file);
if (req->file && (req->flags & REQ_F_ISREG)) {
bool should_hash = def->hash_reg_file;
@@ -1771,9 +1771,9 @@ unsigned int io_file_get_flags(struct file *file)
unsigned int res = 0;
if (S_ISREG(file_inode(file)->i_mode))
- res |= FFS_ISREG;
+ res |= REQ_F_ISREG;
if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT))
- res |= FFS_NOWAIT;
+ res |= REQ_F_SUPPORT_NOWAIT;
return res;
}