Skip to contentSkip to conversation

io_uring: remove IORING_MAX_FIXED_FILES

PATCH New Jens Axboe 1 participant 1 message Aug 24, 2021

Subsystems (2)
lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 io_uring: remove IORING_MAX_FIXED_FILES

Since we now just use max open files to guard the size of the fixed file table, it doesn't make any sense to impose further limits on the max table size.

---

fs/io_uring.c +0 -3
index 53eb75cda745..054e13643ba6 100644
@@ -93,7 +93,6 @@
 #define IORING_SQPOLL_CAP_ENTRIES_VALUE 8
 
 /* only define max */
-#define IORING_MAX_FIXED_FILES	(1U << 15)
 #define IORING_MAX_RESTRICTIONS	(IORING_RESTRICTION_LAST + \
 				 IORING_REGISTER_LAST + IORING_OP_LAST)
 
@@ -8036,8 +8035,6 @@ static int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg,
 		return -EBUSY;
 	if (!nr_args)
 		return -EINVAL;
-	if (nr_args > IORING_MAX_FIXED_FILES)
-		return -EMFILE;
 	if (nr_args > rlimit(RLIMIT_NOFILE))
 		return -EMFILE;
 	ret = io_rsrc_node_switch_start(ctx);
Signature · 1 line
Jens Axboe