diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-10-28 08:35:05 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-11-02 15:45:30 -0600 |
commit | cb1717a7cd0fc8a063bd7fe3b4eb6fd81defb11c (patch) | |
tree | 866e11a7781ee58a09c6d219ecd06ac8d265d5cd /io_uring/fdinfo.c | |
parent | b54a14041ee6444692d95ff38c8b3d1af682aa17 (diff) |
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>
Diffstat (limited to 'io_uring/fdinfo.c')
-rw-r--r-- | io_uring/fdinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c index e3f5e9fe5562..9d96481e2eb6 100644 --- a/io_uring/fdinfo.c +++ b/io_uring/fdinfo.c @@ -167,8 +167,10 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file) seq_printf(m, "SqWorkTime:\t%llu\n", sq_work_time); seq_printf(m, "UserFiles:\t%u\n", ctx->file_table.data.nr); for (i = 0; has_lock && i < ctx->file_table.data.nr; i++) { - struct file *f = io_file_from_index(&ctx->file_table, i); + struct file *f = NULL; + if (ctx->file_table.data.nodes[i]) + f = io_slot_file(ctx->file_table.data.nodes[i]); if (f) seq_printf(m, "%5u: %s\n", i, file_dentry(f)->d_iname); else |