Re: Patch/resubmit linux-2.5.63-bk4 try_module_get simplification

Roman Zippel (
Sun, 2 Mar 2003 19:37:09 +0100 (CET)


On Sun, 2 Mar 2003, Adam J. Richter wrote:

> Is there enough traffic on the module reference counts to make
> this trade-off worthwhile?

I don't know, you have to ask that Rusty.
BTW the same trick is also possible with the old module count:

int try_inc_mod_count(struct module *mod)
int res;

if (mod) {
if (unlikely(mod->flags & MOD_DELETED))
goto check;
return 1;
res = 1;
if (mod->flags & MOD_DELETED) {
res = 0;
return res;

(and a similiar change to sys_delete_module.)

bye, Roman

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at