]> git.ipfire.org Git - thirdparty/linux.git/commit
debugfs: allow to store an additional opaque pointer at file creation
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Jan 2025 08:06:49 +0000 (08:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2025 12:14:36 +0000 (13:14 +0100)
commit12c92098932b4bbf38396e9aed0a343d35437a21
treef7efc17358613533ac59abea8dab106e74eba2fc
parent95688800eefe28240204c2a0dd2bca5bf5f7f1d9
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>
fs/debugfs/file.c
fs/debugfs/inode.c
fs/debugfs/internal.h
include/linux/debugfs.h