Skip to content

Commit 9a10926

Browse files
committed
io_uring/fdinfo: only compile if CONFIG_PROC_FS is set
Rather than wrap fdinfo.c in one big if, handle it on the Makefile side instead. io_uring.c already conditionally sets fops->fdinfo() anyway. Signed-off-by: Jens Axboe <[email protected]>
1 parent 3de7361 commit 9a10926

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

io_uring/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ obj-$(CONFIG_IO_URING) += io_uring.o opdef.o kbuf.o rsrc.o notif.o \
1111
eventfd.o uring_cmd.o openclose.o \
1212
sqpoll.o xattr.o nop.o fs.o splice.o \
1313
sync.o msg_ring.o advise.o openclose.o \
14-
statx.o timeout.o fdinfo.o cancel.o \
14+
statx.o timeout.o cancel.o \
1515
waitid.o register.o truncate.o \
1616
memmap.o alloc_cache.o
1717
obj-$(CONFIG_IO_URING_ZCRX) += zcrx.o
@@ -20,3 +20,4 @@ obj-$(CONFIG_FUTEX) += futex.o
2020
obj-$(CONFIG_EPOLL) += epoll.o
2121
obj-$(CONFIG_NET_RX_BUSY_POLL) += napi.o
2222
obj-$(CONFIG_NET) += net.o cmd_net.o
23+
obj-$(CONFIG_PROC_FS) += fdinfo.o

io_uring/fdinfo.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "cancel.h"
1616
#include "rsrc.h"
1717

18-
#ifdef CONFIG_PROC_FS
1918
static __cold int io_uring_show_cred(struct seq_file *m, unsigned int id,
2019
const struct cred *cred)
2120
{
@@ -264,4 +263,3 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
264263
mutex_unlock(&ctx->uring_lock);
265264
}
266265
}
267-
#endif

0 commit comments

Comments
 (0)