Skip to content

Commit 867d93d

Browse files
bsberndMiklos Szeredi
authored andcommitted
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>
1 parent 92270d0 commit 867d93d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

fs/fuse/dev.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ MODULE_ALIAS("devname:fuse");
3535

3636
static struct kmem_cache *fuse_req_cachep;
3737

38-
static struct fuse_dev *fuse_get_dev(struct file *file)
39-
{
40-
/*
41-
* Lockless access is OK, because file->private data is set
42-
* once during mount and is valid until the file is released.
43-
*/
44-
return READ_ONCE(file->private_data);
45-
}
46-
4738
static void fuse_request_init(struct fuse_mount *fm, struct fuse_req *req)
4839
{
4940
INIT_LIST_HEAD(&req->list);

fs/fuse/fuse_dev_i.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88

99
#include <linux/types.h>
1010

11+
static inline struct fuse_dev *fuse_get_dev(struct file *file)
12+
{
13+
/*
14+
* Lockless access is OK, because file->private data is set
15+
* once during mount and is valid until the file is released.
16+
*/
17+
return READ_ONCE(file->private_data);
18+
}
19+
1120
void fuse_dev_end_requests(struct list_head *head);
1221

1322
#endif

0 commit comments

Comments
 (0)