Re: Re: [RFC PATCH 5/5] module: Remove stop_machine from module unloading

From: Rusty Russell
Date: Wed Oct 22 2014 - 00:36:22 EST


Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx> writes:
>>> +/*
>>> + * MODULE_REF_BASE must be 1, since we use atomic_inc_not_zero() for
>>> + * recovering refcnt (see try_release_module_ref() ).
>>> + */
>>> +#define MODULE_REF_BASE 1
>>
>> True, but we could use atomic_add_unless() instead, and make this
>> completely generic, right?
>
> Would you mean just replacing atomic_inc_not_zero() with atomic_add_unless()?

Yes.

Cheers,
Rusty.
--
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/