blk-cgroup: use op_is_sync to check for synchronous requests
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Nov 2016 13:40:03 +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>
include/linux/blk-cgroup.h

index ddaf28d0988f9b4302d7161c62c6f8520fe46e74..01b62e7bac74bbc792d19255bacea90ae5b52abf 100644 (file)
@@ -599,7 +599,7 @@ static inline void blkg_rwstat_add(struct blkg_rwstat *rwstat,
 
        __percpu_counter_add(cnt, val, BLKG_STAT_CPU_BATCH);
 
-       if (op & REQ_SYNC)
+       if (op_is_sync(op))
                cnt = &rwstat->cpu_cnt[BLKG_RWSTAT_SYNC];
        else
                cnt = &rwstat->cpu_cnt[BLKG_RWSTAT_ASYNC];