debugfs_get_aux(): allow storing non-const void *

typechecking is up to users, anyway...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/r/20250702212616.GI3406663@ZenIV
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Al Viro
2025-07-02 22:26:16 +01:00
committed by Greg Kroah-Hartman
parent 00bbe512e6
commit 9d3b96be2e
5 changed files with 5 additions and 5 deletions

View File

@@ -47,7 +47,7 @@ const struct file_operations debugfs_noop_file_operations = {
#define F_DENTRY(filp) ((filp)->f_path.dentry)
const void *debugfs_get_aux(const struct file *file)
void *debugfs_get_aux(const struct file *file)
{
return DEBUGFS_I(file_inode(file))->aux;
}

View File

@@ -459,7 +459,7 @@ static struct dentry *__debugfs_create_file(const char *name, umode_t mode,
proxy_fops = &debugfs_noop_file_operations;
inode->i_fop = proxy_fops;
DEBUGFS_I(inode)->raw = real_fops;
DEBUGFS_I(inode)->aux = aux;
DEBUGFS_I(inode)->aux = (void *)aux;
d_instantiate(dentry, inode);
fsnotify_create(d_inode(dentry->d_parent), dentry);

View File

@@ -19,7 +19,7 @@ struct debugfs_inode_info {
const struct debugfs_short_fops *short_fops;
debugfs_automount_t automount;
};
const void *aux;
void *aux;
};
static inline struct debugfs_inode_info *DEBUGFS_I(struct inode *inode)