]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fuse: move fuse_dev_waitq to dev.c
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 19 Mar 2026 14:49:56 +0000 (15:49 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 15 Jun 2026 12:06:16 +0000 (14:06 +0200)
Move wake_up_all(&fuse_dev_waitq) into fuse_dev_install() where it
logically belongs.

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

index cc89346f29fb9e10edbb0f2cee31f90cd4b29d53..96f0815b4df44646262bb0ecb715e9961ff0563d 100644 (file)
@@ -31,6 +31,8 @@
 MODULE_ALIAS_MISCDEV(FUSE_MINOR);
 MODULE_ALIAS("devname:fuse");
 
+static DECLARE_WAIT_QUEUE_HEAD(fuse_dev_waitq);
+
 static struct kmem_cache *fuse_req_cachep;
 
 static void fuse_request_init(struct fuse_mount *fm, struct fuse_req *req)
@@ -481,6 +483,7 @@ void fuse_dev_install(struct fuse_dev *fud, struct fuse_conn *fc)
        } else {
                list_add_tail(&fud->entry, &fc->chan->devices);
                fuse_conn_get(fc);
+               wake_up_all(&fuse_dev_waitq);
        }
        spin_unlock(&fc->chan->lock);
 }
index d1eb816f0c4adf48595a006a7aa0adc3d2e40fc0..846abb063c6950c1775fd6bed327471528d23989 100644 (file)
@@ -13,8 +13,6 @@
 #define FUSE_INT_REQ_BIT (1ULL << 0)
 #define FUSE_REQ_ID_STEP (1ULL << 1)
 
-extern struct wait_queue_head fuse_dev_waitq;
-
 struct fuse_arg;
 struct fuse_args;
 struct fuse_pqueue;
index 54059404e7c4fd894996d812f6dad78d63dec055..5695a7dca05110752763bd963770e129ecbebee7 100644 (file)
@@ -34,7 +34,6 @@ MODULE_LICENSE("GPL");
 static struct kmem_cache *fuse_inode_cachep;
 struct list_head fuse_conn_list;
 DEFINE_MUTEX(fuse_mutex);
-DECLARE_WAIT_QUEUE_HEAD(fuse_dev_waitq);
 
 static int set_global_limit(const char *val, const struct kernel_param *kp);
 
@@ -1789,10 +1788,9 @@ int fuse_fill_super_common(struct super_block *sb, struct fuse_fs_context *ctx)
 
        list_add_tail(&fc->entry, &fuse_conn_list);
        sb->s_root = root_dentry;
-       if (fud) {
+       if (fud)
                fuse_dev_install(fud, fc);
-               wake_up_all(&fuse_dev_waitq);
-       }
+
        mutex_unlock(&fuse_mutex);
        return 0;