xref: /linux-6.15/fs/fuse/fuse_dev_i.h (revision 88be7aa9)
1 /* SPDX-License-Identifier: GPL-2.0
2  *
3  * FUSE: Filesystem in Userspace
4  * Copyright (C) 2001-2008  Miklos Szeredi <[email protected]>
5  */
6 #ifndef _FS_FUSE_DEV_I_H
7 #define _FS_FUSE_DEV_I_H
8 
9 #include <linux/types.h>
10 
11 /* Ordinary requests have even IDs, while interrupts IDs are odd */
12 #define FUSE_INT_REQ_BIT (1ULL << 0)
13 #define FUSE_REQ_ID_STEP (1ULL << 1)
14 
15 static inline struct fuse_dev *fuse_get_dev(struct file *file)
16 {
17 	/*
18 	 * Lockless access is OK, because file->private data is set
19 	 * once during mount and is valid until the file is released.
20 	 */
21 	return READ_ONCE(file->private_data);
22 }
23 
24 void fuse_dev_end_requests(struct list_head *head);
25 
26 #endif
27 
28