Merge branch 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[linux-2.6-block.git] / fs / btrfs / volumes.c
index bb8592e1a364d6324bb4d90d3d380543e31e4136..3c3c69c0eee41494d751b2638d20cf6bf0811ca1 100644 (file)
@@ -6012,7 +6012,7 @@ static void btrfs_end_bio(struct bio *bio)
                                else
                                        btrfs_dev_stat_inc(dev,
                                                BTRFS_DEV_STAT_READ_ERRS);
-                               if ((bio->bi_opf & WRITE_FLUSH) == WRITE_FLUSH)
+                               if (bio->bi_opf & REQ_PREFLUSH)
                                        btrfs_dev_stat_inc(dev,
                                                BTRFS_DEV_STAT_FLUSH_ERRS);
                                btrfs_dev_stat_print_on_error(dev);
@@ -6089,7 +6089,7 @@ static noinline void btrfs_schedule_bio(struct btrfs_device *device,
        bio->bi_next = NULL;
 
        spin_lock(&device->io_lock);
-       if (bio->bi_opf & REQ_SYNC)
+       if (op_is_sync(bio->bi_opf))
                pending_bios = &device->pending_sync_bios;
        else
                pending_bios = &device->pending_bios;