Skip to content

Commit bebdb65

Browse files
tklauseraxboe
authored andcommitted
io_uring: define and set show_fdinfo only if procfs is enabled
Follow the pattern used with other *_show_fdinfo functions and only define and use io_uring_show_fdinfo and its helper functions if CONFIG_PROC_FS is set. Fixes: 87ce955 ("io_uring: add ->show_fdinfo() for the io_uring file descriptor") Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent dd3db2a commit bebdb65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/io_uring.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6641,6 +6641,7 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
66416641
return submitted ? submitted : ret;
66426642
}
66436643

6644+
#ifdef CONFIG_PROC_FS
66446645
static int io_uring_show_cred(int id, void *p, void *data)
66456646
{
66466647
const struct cred *cred = p;
@@ -6714,6 +6715,7 @@ static void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
67146715
percpu_ref_put(&ctx->refs);
67156716
}
67166717
}
6718+
#endif
67176719

67186720
static const struct file_operations io_uring_fops = {
67196721
.release = io_uring_release,
@@ -6725,7 +6727,9 @@ static const struct file_operations io_uring_fops = {
67256727
#endif
67266728
.poll = io_uring_poll,
67276729
.fasync = io_uring_fasync,
6730+
#ifdef CONFIG_PROC_FS
67286731
.show_fdinfo = io_uring_show_fdinfo,
6732+
#endif
67296733
};
67306734

67316735
static int io_allocate_scq_urings(struct io_ring_ctx *ctx,

0 commit comments

Comments
 (0)