diff options
author | Bernd Schubert <bschubert@ddn.com> | 2025-01-20 02:28:55 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2025-01-24 11:53:45 +0100 |
commit | 867d93dcdede5ea453543085d1ed0bf43cde60de (patch) | |
tree | e9355633b768fd71bb3e43f10315301ed6cab1dc | |
parent | 92270d076115ae81b83f0605703602d2d5a866e2 (diff) |
fuse: Move fuse_get_dev to header file
Another preparation patch, as this function will be needed by
fuse/dev.c and fuse/dev_uring.c.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
Reviewed-by: Luis Henriques <luis@igalia.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
-rw-r--r-- | fs/fuse/dev.c | 9 | ||||
-rw-r--r-- | fs/fuse/fuse_dev_i.h | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 757f2c797d68..3db3282bdac4 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -35,15 +35,6 @@ MODULE_ALIAS("devname:fuse"); static struct kmem_cache *fuse_req_cachep; -static struct fuse_dev *fuse_get_dev(struct file *file) -{ - /* - * Lockless access is OK, because file->private data is set - * once during mount and is valid until the file is released. - */ - return READ_ONCE(file->private_data); -} - static void fuse_request_init(struct fuse_mount *fm, struct fuse_req *req) { INIT_LIST_HEAD(&req->list); diff --git a/fs/fuse/fuse_dev_i.h b/fs/fuse/fuse_dev_i.h index 4fcff2223fa6..e7ea1b21c182 100644 --- a/fs/fuse/fuse_dev_i.h +++ b/fs/fuse/fuse_dev_i.h @@ -8,6 +8,15 @@ #include <linux/types.h> +static inline struct fuse_dev *fuse_get_dev(struct file *file) +{ + /* + * Lockless access is OK, because file->private data is set + * once during mount and is valid until the file is released. + */ + return READ_ONCE(file->private_data); +} + void fuse_dev_end_requests(struct list_head *head); #endif |