]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fuse: add back pointer from fuse_chan to fuse_conn
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 18 Mar 2026 16:49:01 +0000 (17:49 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 15 Jun 2026 12:06:16 +0000 (14:06 +0200)
Will be needed by callbacks from the transport layer to the fs layer.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/fuse_dev_i.h
fs/fuse/inode.c

index 22d9c9e795d94d1d42b2bd0b3dd8a43b7977d6cd..188a21f1e141cd07ea52953ee043df178b22b0c4 100644 (file)
@@ -96,6 +96,9 @@ struct fuse_chan {
         */
        spinlock_t lock;
 
+       /* back pointer: fc->chan->conn == fc */
+       struct fuse_conn *conn;
+
        /** Input queue */
        struct fuse_iqueue iq;
 
index e34881ae8b9fddf0721f708c1e53579322d0b0d0..3d9ac14d636cb668c7eaa86e7ac47ca94c6fff0f 100644 (file)
@@ -995,6 +995,7 @@ void fuse_conn_init(struct fuse_conn *fc, struct fuse_mount *fm,
        INIT_LIST_HEAD(&fc->mounts);
        list_add(&fm->fc_entry, &fc->mounts);
        fm->fc = fc;
+       fch->conn = fc;
        fc->chan = fch;
 }
 EXPORT_SYMBOL_GPL(fuse_conn_init);