]> granicus.if.org Git - spl/commitdiff
Linux 3.16 compat: smp_mb__after_clear_bit()
authorTurbo Fredriksson <turbo@bayour.com>
Sun, 14 Sep 2014 15:47:22 +0000 (15:47 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 22 Sep 2014 23:24:55 +0000 (16:24 -0700)
The smp_mb__{before,after}_clear_bit functions have been renamed
smp_mb__{before,after}_atomic.  Rather than adding a compatibility
function to handle this the code has been updated to use smp_wmb().

This has the advantage of being a stable functionally equivalent
interface.  On many architectures smp_mb__after_clear_bit() expands
to smp_wmb().  Others might be able to do something slightly more
efficient but this will be safe and correct on all of them.

Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #386

module/spl/spl-kmem.c

index 6de513e4500eb1b7f8e26ca977ba7f2350e9a080..79954eb2a19359dcf4111b91def6443052f8ac7f 100644 (file)
@@ -2365,7 +2365,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count)
 
        spl_slab_reclaim(skc, count, 1);
        clear_bit(KMC_BIT_REAPING, &skc->skc_flags);
-       smp_mb__after_clear_bit();
+       smp_wmb();
        wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING);
 out:
        atomic_dec(&skc->skc_ref);