btrfs: use op_is_sync to check for synchronous requests
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Nov 2016 13:40:06 +0000 (07:40 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 1 Nov 2016 15:43:26 +0000 (09:43 -0600)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/btrfs/disk-io.c
fs/btrfs/volumes.c

index 3a57f99d96aa7aa0af541e328af203ff73acdb64..c8454a8e35f2e30329ddd4d5845bdedf39237dc9 100644 (file)
@@ -930,7 +930,7 @@ int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode,
 
        atomic_inc(&fs_info->nr_async_submits);
 
-       if (bio->bi_opf & REQ_SYNC)
+       if (op_is_sync(bio->bi_opf))
                btrfs_set_work_high_priority(&async->work);
 
        btrfs_queue_work(fs_info->workers, &async->work);
index 71a60cc014519cb2feb4dddb106458e46bf0e6a8..deda46cf1292f683f1f94d48ac4f9d85b6140a7c 100644 (file)
@@ -6100,7 +6100,7 @@ static noinline void btrfs_schedule_bio(struct btrfs_root *root,
        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;