diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-10-16 21:30:48 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-10-16 17:07:12 -0600 |
commit | 38eddb2c75fb99b9cd78445094ca0e1bda08d102 (patch) | |
tree | 628f88e6f0449881091b76e5851a186b85864357 /io_uring/filetable.h | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) |
io_uring: remove FFS_SCM
THe lifetime of SCM'ed files is bound to ring_sock, which is destroyed
strictly after we're done with registered file tables. This means there
is no need for the FFS_SCM hack, which was not available on 32-bit builds
anyway.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/984226a1045adf42dc35d8bd7fb5a8bbfa472ce1.1665891182.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/filetable.h')
-rw-r--r-- | io_uring/filetable.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/io_uring/filetable.h b/io_uring/filetable.h index ff3a712e11bf..19d2aed66c72 100644 --- a/io_uring/filetable.h +++ b/io_uring/filetable.h @@ -5,22 +5,9 @@ #include <linux/file.h> #include <linux/io_uring_types.h> -/* - * FFS_SCM is only available on 64-bit archs, for 32-bit we just define it as 0 - * and define IO_URING_SCM_ALL. For this case, we use SCM for all files as we - * can't safely always dereference the file when the task has exited and ring - * cleanup is done. If a file is tracked and part of SCM, then unix gc on - * process exit may reap it before __io_sqe_files_unregister() is run. - */ #define FFS_NOWAIT 0x1UL #define FFS_ISREG 0x2UL -#if defined(CONFIG_64BIT) -#define FFS_SCM 0x4UL -#else -#define IO_URING_SCM_ALL -#define FFS_SCM 0x0UL -#endif -#define FFS_MASK ~(FFS_NOWAIT|FFS_ISREG|FFS_SCM) +#define FFS_MASK ~(FFS_NOWAIT|FFS_ISREG) bool io_alloc_file_tables(struct io_file_table *table, unsigned nr_files); void io_free_file_tables(struct io_file_table *table); |