modprobe: rework module removal without tree traversing
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 12 Jan 2012 17:23:51 +0000 (15:23 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 12 Jan 2012 17:23:51 +0000 (15:23 -0200)
commita872bba22d72480621027e96a392816df2b1b4db
tree33d0ba4ff8cadbf24f2ca9e0f967a2cf05cf8166
parentf564394f99e4565472d7d4d15b9d3129389ed9a0
modprobe: rework module removal without tree traversing

Just like the module insertion, module removal is remade.

The dependencies line that comes from modules.dep already contains all
the dependencies necessary to remove that module. Therefore modprobe
doesn't have to do the recursion between the modules in order to remove
it. All we have to do is to remove in order:

For the module being removed:
----------------------------

1. softdeps (in reverse order)
2. deps (in reverse order)
3. module
4. postdeps (in reverse order)

For any of the dependencies:
----------------------------

1. softdeps (in reverse order)
2. module
3. softdeps (in reverse order)
tools/kmod-modprobe.c