Skip to content

Commit

Permalink
btrfs: use op_is_sync to check for synchronous requests
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Nov 1, 2016
1 parent 83b5df6 commit 67f055c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 67f055c

Please sign in to comment.