]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/md/dm-region-hash.c
Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / drivers / md / dm-region-hash.c
index 74cb7b991d41d80384e3aaf34baf030579cc93d6..b11813431f31eb170955ee1a0b14329f403b15f1 100644 (file)
@@ -398,12 +398,12 @@ void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio)
        region_t region = dm_rh_bio_to_region(rh, bio);
        int recovering = 0;
 
-       if (bio->bi_rw & REQ_FLUSH) {
+       if (bio->bi_rw & REQ_PREFLUSH) {
                rh->flush_failure = 1;
                return;
        }
 
-       if (bio->bi_rw & REQ_DISCARD)
+       if (bio_op(bio) == REQ_OP_DISCARD)
                return;
 
        /* We must inform the log that the sync count has changed. */
@@ -526,7 +526,7 @@ void dm_rh_inc_pending(struct dm_region_hash *rh, struct bio_list *bios)
        struct bio *bio;
 
        for (bio = bios->head; bio; bio = bio->bi_next) {
-               if (bio->bi_rw & (REQ_FLUSH | REQ_DISCARD))
+               if (bio->bi_rw & REQ_PREFLUSH || bio_op(bio) == REQ_OP_DISCARD)
                        continue;
                rh_inc(rh, dm_rh_bio_to_region(rh, bio));
        }