diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2022-03-29 02:05:37 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2022-04-06 22:03:59 -0700 |
commit | 42b32d30c38ef032f287957266a022eb28430bfc (patch) | |
tree | cbdf9ae9e5206a2515757e49704654c5ec0aa3be /man | |
parent | d890179b451211c506b7860f125a6ae181c9f5dc (diff) | |
download | kmod-42b32d30c38ef032f287957266a022eb28430bfc.tar.gz kmod-42b32d30c38ef032f287957266a022eb28430bfc.tar.bz2 kmod-42b32d30c38ef032f287957266a022eb28430bfc.zip |
modprobe: Fix holders removal
The idea behind --remove-dependencies was to remove other modules that
depend on the current module being removed. It's the reverse
dependency list, not the dependency list of the current module: that
never works since the current module would still hold a ref on it.
Fix it by replacing the call to kmod_module_get_dependencies() with
kmod_module_get_holders() when using that option. Also try to cleanup
the confusion by renaming the option to --remove-holders: "holder" is
the name used in sysfs and by libkmod to refer to a "live" reverse
dependency like what we are interested in.
Before:
./tools/modprobe -D -r --remove-dependencies video
rmmod video
After:
./tools/modprobe -D -r --remove-holders video
rmmod i915
rmmod thinkpad_acpi
rmmod video
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'man')
0 files changed, 0 insertions, 0 deletions