#include <linux/swap.h>
 #include <linux/splice.h>
 #include <linux/sched.h>
+#include <linux/seq_file.h>
 
 #define CREATE_TRACE_POINTS
 #include "fuse_trace.h"
        }
 }
 
+#ifdef CONFIG_PROC_FS
+static void fuse_dev_show_fdinfo(struct seq_file *seq, struct file *file)
+{
+       struct fuse_dev *fud = fuse_get_dev(file);
+       if (!fud)
+               return;
+
+       seq_printf(seq, "fuse_connection:\t%u\n", fud->fc->dev);
+}
+#endif
+
 const struct file_operations fuse_dev_operations = {
        .owner          = THIS_MODULE,
        .open           = fuse_dev_open,
 #ifdef CONFIG_FUSE_IO_URING
        .uring_cmd      = fuse_uring_cmd,
 #endif
+#ifdef CONFIG_PROC_FS
+       .show_fdinfo    = fuse_dev_show_fdinfo,
+#endif
 };
 EXPORT_SYMBOL_GPL(fuse_dev_operations);