Pull block fixes from Jens Axboe: "Small set of fixes that should go into this series. This contains: - compat signal mask fix for io_uring (Arnd) - EAGAIN corner case for direct vs buffered writes for io_uring (Roman) - NVMe pull request from Christoph with various little fixes - sbitmap ws_active fix, which caused a perf regression for shared tags (me) - sbitmap bit ordering fix (Ming) - libata on-stack DMA fix (Raymond)" * tag 'for-linus-20190329' of git://git.kernel.dk/linux-block: nvmet: fix error flow during ns enable nvmet: fix building bvec from sg list nvme-multipath: relax ANA state check nvme-tcp: fix an endianess miss-annotation libata: fix using DMA buffers on stack io_uring: offload write to async worker in case of -EAGAIN sbitmap: order READ/WRITE freed instance and setting clear bit blk-mq: fix sbitmap ws_active for shared tags io_uring: fix big-endian compat signal mask handling blk-mq: update comment for blk_mq_hctx_has_pending() blk-mq: use blk_mq_put_driver_tag() to put tag
Showing the changes to lib (1 of 10 files). Show all
Unified · Split
| @@ -591,6 +591,17 @@ EXPORT_SYMBOL_GPL(sbitmap_queue_wake_up); · 590 unmodified lines | ||
| 591 | 591 | void sbitmap_queue_clear(struct sbitmap_queue *sbq, unsigned int nr, |
| 592 | 592 | unsigned int cpu) |
| 593 | 593 | { |
| 594 | + /* | |
| 595 | + * Once the clear bit is set, the bit may be allocated out. | |
| 596 | + * | |
| 597 | + * Orders READ/WRITE on the asssociated instance(such as request | |
| 598 | + * of blk_mq) by this bit for avoiding race with re-allocation, | |
| 599 | + * and its pair is the memory barrier implied in __sbitmap_get_word. | |
| 600 | + * | |
| 601 | + * One invariant is that the clear bit has to be zero when the bit | |
| 602 | + * is in use. | |
| 603 | + */ | |
| 604 | + smp_mb__before_atomic(); | |
| 594 | 605 | sbitmap_deferred_clear_bit(&sbq->sb, nr); |
| 595 | 606 | |
| 596 | 607 | /* |