[patch] Re: rmmod -a does not unload unused modules in 2.2.x

Tuukka Toivonen (tuukkat@ees2.oulu.fi)
Thu, 25 Nov 1999 01:09:35 +0200 (EET)


Strange thing -- I had similar problem and wrote a patch, which I was about
the send to the list just when I read your mails.

For first, rmmod -a has to be run 2 times before anything happens. But this
still doesn't clean up "(unused)" modules. Why? Maybe there is a reason,
but my system works fine with the test removed. Patch attached.

Could this be included in the kernel, and if not, why not?

--
| Tuukka Toivonen <tuukkat@ee.oulu.fi>       [PGP public key
| Homepage: http://www.ee.oulu.fi/~tuukkat/       available]
| Try also finger -l tuukkat@ee.oulu.fi
| Studying information engineering at the University of Oulu
+-----------------------------------------------------------

--- linux-2.2.13/kernel/module.c.old Sun Dec 27 20:41:41 1998 +++ linux-2.2.13/kernel/module.c Mon Nov 22 00:39:42 1999 @@ -397,7 +397,6 @@ && (mod->flags & MOD_AUTOCLEAN) && (mod->flags & MOD_RUNNING) && !(mod->flags & MOD_DELETED) - && (mod->flags & MOD_USED_ONCE) && !__MOD_IN_USE(mod)) { if ((mod->flags & MOD_VISITED) && !(mod->flags & MOD_JUST_FREED)) {

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/