]>
Commit | Line | Data |
---|---|---|
3bce94fd | 1 | // SPDX-License-Identifier: GPL-2.0 |
9fd4dcec NS |
2 | /* |
3 | * internal.h - declarations internal to debugfs | |
4 | * | |
5 | * Copyright (C) 2016 Nicolai Stange <[email protected]> | |
9fd4dcec NS |
6 | */ |
7 | ||
8 | #ifndef _DEBUGFS_INTERNAL_H_ | |
9 | #define _DEBUGFS_INTERNAL_H_ | |
10 | ||
11 | struct file_operations; | |
9fd4dcec NS |
12 | |
13 | /* declared over in file.c */ | |
14 | extern const struct file_operations debugfs_noop_file_operations; | |
15 | extern const struct file_operations debugfs_open_proxy_file_operations; | |
49d200de | 16 | extern const struct file_operations debugfs_full_proxy_file_operations; |
9fd4dcec | 17 | |
7c8d4698 NS |
18 | struct debugfs_fsdata { |
19 | const struct file_operations *real_fops; | |
e9117a5a NS |
20 | refcount_t active_users; |
21 | struct completion active_users_drained; | |
7c8d4698 NS |
22 | }; |
23 | ||
7d39bc50 NS |
24 | /* |
25 | * A dentry's ->d_fsdata either points to the real fops or to a | |
26 | * dynamically allocated debugfs_fsdata instance. | |
27 | * In order to distinguish between these two cases, a real fops | |
28 | * pointer gets its lowest bit set. | |
29 | */ | |
30 | #define DEBUGFS_FSDATA_IS_REAL_FOPS_BIT BIT(0) | |
31 | ||
9fd4dcec | 32 | #endif /* _DEBUGFS_INTERNAL_H_ */ |