summaryrefslogtreecommitdiff
path: root/io_uring/filetable.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-20 14:32:32 +0300
committerJens Axboe <axboe@kernel.dk>2023-06-20 18:36:22 +0300
commit8487f083c6ff6e02b2ec14f22ef2b0079a1b6425 (patch)
treed6ead3cfb5f4ab86634ead614fdb71436fc43f4d /io_uring/filetable.h
parent3beed235d1a1d0a4ab093ab67ea6b2841e9d4fa2 (diff)
downloadlinux-8487f083c6ff6e02b2ec14f22ef2b0079a1b6425.tar.xz
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/filetable.h')
-rw-r--r--io_uring/filetable.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/io_uring/filetable.h b/io_uring/filetable.h
index 351111ff8882..697cb68adc81 100644
--- a/io_uring/filetable.h
+++ b/io_uring/filetable.h
@@ -54,10 +54,8 @@ static inline struct file *io_file_from_index(struct io_file_table *table,
static inline void io_fixed_file_set(struct io_fixed_file *file_slot,
struct file *file)
{
- unsigned long file_ptr = (unsigned long) file;
-
- file_ptr |= io_file_get_flags(file);
- file_slot->file_ptr = file_ptr;
+ file_slot->file_ptr = (unsigned long)file |
+ (io_file_get_flags(file) >> REQ_F_SUPPORT_NOWAIT_BIT);
}
static inline void io_reset_alloc_hint(struct io_ring_ctx *ctx)