From: Jeff Mahoney <jeffm@suse.com>
Subject: dm-raid45: api update after removal of barriers
Patch-mainline: Whenever dmraid45 is

 This patch updates dm-raid45 to deal with the removal of the
 barrier interface.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 drivers/md/dm-raid45.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

--- a/drivers/md/dm-raid45.c
+++ b/drivers/md/dm-raid45.c
@@ -196,10 +195,6 @@ enum chunk_flags {
 	CHUNK_UPTODATE,		/* Chunk pages are uptodate. */
 };
 
-#if READ != 0 || WRITE != 1
-#error dm-raid45: READ/WRITE != 0/1 used as index!!!
-#endif
-
 enum bl_type {
 	WRITE_QUEUED = WRITE + 1,
 	WRITE_MERGED,
@@ -3276,7 +3271,7 @@ static void do_ios(struct raid_set *rs,
 		 * the input queue unless all work queues are empty
 		 * and the stripe cache is inactive.
 		 */
-		if (unlikely(bio_empty_barrier(bio))) {
+		if (bio->bi_rw & REQ_FLUSH) {
 			/* REMOVEME: statistics. */
 			atomic_inc(rs->stats + S_BARRIER);
 			if (delay ||
