mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 12:54:27 +00:00
When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. This requires saving off the root directory dentry to make creation of individual device subdirectories easier. Cc: Paulo Miguel Almeida <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Sidong Yang <[email protected]> Cc: Liu Shixin <[email protected]> Cc: "Uwe Kleine-König" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>