mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 06:44:36 -05:00
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>
This commit is contained in:
committed by
Miklos Szeredi
parent
92270d0761
commit
867d93dcde
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user