Commit 67f055c7 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

btrfs: use op_is_sync to check for synchronous requests

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 83b5df67
...@@ -930,7 +930,7 @@ int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode, ...@@ -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); 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_set_work_high_priority(&async->work);
btrfs_queue_work(fs_info->workers, &async->work); btrfs_queue_work(fs_info->workers, &async->work);
......
...@@ -6100,7 +6100,7 @@ static noinline void btrfs_schedule_bio(struct btrfs_root *root, ...@@ -6100,7 +6100,7 @@ static noinline void btrfs_schedule_bio(struct btrfs_root *root,
bio->bi_next = NULL; bio->bi_next = NULL;
spin_lock(&device->io_lock); spin_lock(&device->io_lock);
if (bio->bi_opf & REQ_SYNC) if (op_is_sync(bio->bi_opf))
pending_bios = &device->pending_sync_bios; pending_bios = &device->pending_sync_bios;
else else
pending_bios = &device->pending_bios; pending_bios = &device->pending_bios;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment