Skip to content
Commit cb0b50b8 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Luis Chamberlain
Browse files

module: Remove preempt_disable() from module reference counting.



The preempt_disable() section in module_put() was added in commit
   e1783a24 ("module: Use this_cpu_xx to dynamically allocate counters")

while the per-CPU counter were switched to another API. The API requires
that during the RMW operation the CPU remained the same.

This counting API was later replaced with atomic_t in commit
   2f35c41f ("module: Replace module_ref with atomic_t refcnt")

Since this atomic_t replacement there is no need to keep preemption
disabled while the reference counter is modified.

Remove preempt_disable() from module_put(), __module_get() and
try_module_get().

Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
parent d36f6efb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment