From: Miklos Szeredi Date: Thu, 19 Mar 2026 14:49:56 +0000 (+0100) Subject: fuse: move fuse_dev_waitq to dev.c X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3344b7367acd302c550aa4136a27447d3b39a169;p=thirdparty%2Fkernel%2Flinux.git fuse: move fuse_dev_waitq to dev.c Move wake_up_all(&fuse_dev_waitq) into fuse_dev_install() where it logically belongs. Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index cc89346f29fb9..96f0815b4df44 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -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); } diff --git a/fs/fuse/fuse_dev_i.h b/fs/fuse/fuse_dev_i.h index d1eb816f0c4ad..846abb063c695 100644 --- a/fs/fuse/fuse_dev_i.h +++ b/fs/fuse/fuse_dev_i.h @@ -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; diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 54059404e7c4f..5695a7dca0511 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -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;