mirror of
https://github.com/opnsense/src.git
synced 2026-06-05 23:04:36 -04:00
lindebugfs: Add debugfs_lookup()
[Why] This function is used by hhe DRM generic code starting with Linux 6.7. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48761
This commit is contained in:
parent
f570760e5f
commit
2ee1311820
2 changed files with 19 additions and 0 deletions
|
|
@ -328,6 +328,23 @@ debugfs_create_symlink(const char *name, struct dentry *parent,
|
|||
return (NULL);
|
||||
}
|
||||
|
||||
struct dentry *
|
||||
debugfs_lookup(const char *name, struct dentry *parent)
|
||||
{
|
||||
struct dentry_meta *dm;
|
||||
struct dentry *dnode;
|
||||
struct pfs_node *pnode;
|
||||
|
||||
pnode = pfs_find_node(parent->d_pfs_node, name);
|
||||
if (pnode == NULL)
|
||||
return (NULL);
|
||||
|
||||
dm = (struct dentry_meta *)pnode->pn_data;
|
||||
dnode = &dm->dm_dnode;
|
||||
|
||||
return (dnode);
|
||||
}
|
||||
|
||||
void
|
||||
debugfs_remove(struct dentry *dnode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
|
|||
struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent,
|
||||
const char *dest);
|
||||
|
||||
struct dentry *debugfs_lookup(const char *name, struct dentry *parent);
|
||||
|
||||
void debugfs_remove(struct dentry *dentry);
|
||||
|
||||
void debugfs_remove_recursive(struct dentry *dentry);
|
||||
|
|
|
|||
Loading…
Reference in a new issue