]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/fdinfo: only compile if CONFIG_PROC_FS is set
authorJens Axboe <axboe@kernel.dk>
Fri, 16 May 2025 18:10:12 +0000 (12:10 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 16 May 2025 18:33:02 +0000 (12:33 -0600)
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 <axboe@kernel.dk>
io_uring/Makefile
io_uring/fdinfo.c

index 11a739927a623582f59cf3f7b96da17862fb4a40..d97c6b51d58491c5a75e01608b2827c6308c46cc 100644 (file)
@@ -11,7 +11,7 @@ obj-$(CONFIG_IO_URING)                += io_uring.o opdef.o kbuf.o rsrc.o notif.o \
                                        eventfd.o uring_cmd.o openclose.o \
                                        sqpoll.o xattr.o nop.o fs.o splice.o \
                                        sync.o msg_ring.o advise.o openclose.o \
-                                       statx.o timeout.o fdinfo.o cancel.o \
+                                       statx.o timeout.o cancel.o \
                                        waitid.o register.o truncate.o \
                                        memmap.o alloc_cache.o
 obj-$(CONFIG_IO_URING_ZCRX)    += zcrx.o
@@ -20,3 +20,4 @@ obj-$(CONFIG_FUTEX)           += futex.o
 obj-$(CONFIG_EPOLL)            += epoll.o
 obj-$(CONFIG_NET_RX_BUSY_POLL) += napi.o
 obj-$(CONFIG_NET) += net.o cmd_net.o
+obj-$(CONFIG_PROC_FS) += fdinfo.o
index e0d6a59a89fa1b23948c6271d2e9296e8b458c98..b83296eee5f863726c57e2aec57f56ba3d463eba 100644 (file)
@@ -15,7 +15,6 @@
 #include "cancel.h"
 #include "rsrc.h"
 
-#ifdef CONFIG_PROC_FS
 static __cold int io_uring_show_cred(struct seq_file *m, unsigned int id,
                const struct cred *cred)
 {
@@ -264,4 +263,3 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
                mutex_unlock(&ctx->uring_lock);
        }
 }
-#endif