rbd: add barriers near done flag operations
authorAlex Elder <elder@inktank.com>
Wed, 6 Feb 2013 05:41:50 +0000 (23:41 -0600)
committerSage Weil <sage@inktank.com>
Thu, 14 Feb 2013 02:29:11 +0000 (18:29 -0800)
commit077413082f9ade9ca4d9774dbdc81ee7256d8089
tree825678f1ad0b9108bb2beb7e6f1e29415d49d27c
parenta14ea269dd6b5e48a2941ba73b202cd7cd5d716d
rbd: add barriers near done flag operations

Somehow, I missed this little item in Documentation/atomic_ops.txt:
    *** WARNING: atomic_read() and atomic_set() DO NOT IMPLY BARRIERS! ***

Create and use some helper functions that include the proper memory
barriers for manipulating the done field.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c