diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2025-01-12 08:06:49 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-15 13:14:36 +0100 |
| commit | 12c92098932b4bbf38396e9aed0a343d35437a21 (patch) | |
| tree | f7efc17358613533ac59abea8dab106e74eba2fc /fs/debugfs/internal.h | |
| parent | 95688800eefe28240204c2a0dd2bca5bf5f7f1d9 (diff) | |
debugfs: allow to store an additional opaque pointer at file creation
Set by debugfs_create_file_aux(name, mode, parent, data, aux, fops).
Plain debugfs_create_file() has it set to NULL.
Accessed by debugfs_get_aux(file).
Convenience macros for numeric opaque data - debugfs_create_file_aux_num
and debugfs_get_aux_num, resp.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20250112080705.141166-5-viro@zeniv.linux.org.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/debugfs/internal.h')
| -rw-r--r-- | fs/debugfs/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/debugfs/internal.h b/fs/debugfs/internal.h index 8d2de647b42c..93483fe84425 100644 --- a/fs/debugfs/internal.h +++ b/fs/debugfs/internal.h @@ -19,6 +19,7 @@ struct debugfs_inode_info { const struct debugfs_short_fops *short_fops; debugfs_automount_t automount; }; + const void *aux; }; static inline struct debugfs_inode_info *DEBUGFS_I(struct inode *inode) |