diff options
author | David S. Miller <davem@davemloft.net> | 2019-04-05 23:14:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-05 23:14:19 +0200 |
commit | f83f7151950dd9e0f6b4a1a405bf5e55c5294e4d (patch) | |
tree | f8d9d8ee821fcc9f0a8e1a8679bc622219c70e3b /lib | |
parent | Merge branch 'tipc-improve-TIPC-unicast-link-throughput' (diff) | |
parent | Merge tag 'mm-compaction-5.1-rc4' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
download | linux-f83f7151950dd9e0f6b4a1a405bf5e55c5294e4d.tar.xz linux-f83f7151950dd9e0f6b4a1a405bf5e55c5294e4d.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor comment merge conflict in mlx5.
Staging driver has a fixup due to the skb->xmit_more changes
in 'net-next', but was removed in 'net'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbitmap.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sbitmap.c b/lib/sbitmap.c index 5b382c1244ed..155fe38756ec 100644 --- a/lib/sbitmap.c +++ b/lib/sbitmap.c @@ -591,6 +591,17 @@ EXPORT_SYMBOL_GPL(sbitmap_queue_wake_up); void sbitmap_queue_clear(struct sbitmap_queue *sbq, unsigned int nr, unsigned int cpu) { + /* + * Once the clear bit is set, the bit may be allocated out. + * + * Orders READ/WRITE on the asssociated instance(such as request + * of blk_mq) by this bit for avoiding race with re-allocation, + * and its pair is the memory barrier implied in __sbitmap_get_word. + * + * One invariant is that the clear bit has to be zero when the bit + * is in use. + */ + smp_mb__before_atomic(); sbitmap_deferred_clear_bit(&sbq->sb, nr); /* |