Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/filetable: remove io_file_from_index() helper

It's only used in fdinfo, nothing really gained from having this helper.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

+3 -11
+3 -1
io_uring/fdinfo.c
··· 167 167 seq_printf(m, "SqWorkTime:\t%llu\n", sq_work_time); 168 168 seq_printf(m, "UserFiles:\t%u\n", ctx->file_table.data.nr); 169 169 for (i = 0; has_lock && i < ctx->file_table.data.nr; i++) { 170 - struct file *f = io_file_from_index(&ctx->file_table, i); 170 + struct file *f = NULL; 171 171 172 + if (ctx->file_table.data.nodes[i]) 173 + f = io_slot_file(ctx->file_table.data.nodes[i]); 172 174 if (f) 173 175 seq_printf(m, "%5u: %s\n", i, file_dentry(f)->d_iname); 174 176 else
-10
io_uring/filetable.h
··· 49 49 return (struct file *)(node->file_ptr & FFS_MASK); 50 50 } 51 51 52 - static inline struct file *io_file_from_index(struct io_file_table *table, 53 - int index) 54 - { 55 - struct io_rsrc_node *node = io_rsrc_node_lookup(&table->data, index); 56 - 57 - if (node) 58 - return io_slot_file(node); 59 - return NULL; 60 - } 61 - 62 52 static inline void io_fixed_file_set(struct io_rsrc_node *node, 63 53 struct file *file) 64 54 {