Why module_exit() is void and not int? What about can_unload()?

From: Igor Zhbanov
Date: Wed Apr 22 2009 - 10:01:59 EST


Hello!

Sometimes module doesn't want to be unloaded. But now the only way to prevent
unloading (except hanging in module_exit()) is incrementing of module
usage count.

But sometimes module couldn't know whether it is a good time for unload,
and can check a condition only in module_exit() handler. But it is impossible
to return error (something like EAGAIN), since module_exit() is void.

Why not to have int module_exit()? Or some other way to tell the kernel
at module_exit() time that module cannot be unloaded?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/