X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=block%2Fblk-throttle.c;h=9f5fe62afff9284918330e187a29fc00218e1d71;hb=a1b02751d6ec21ec1b9c7c6826fc896ffde1c33d;hp=139b2d7a99e2fae6a4d40fd1e23783d096064330;hpb=60693e3a38903e39e4fac0a9849b698fc36228bd;p=linux-2.6-microblaze.git diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 139b2d7a99e2..9f5fe62afff9 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -2203,8 +2203,9 @@ out_unlock: #ifdef CONFIG_BLK_DEV_THROTTLING_LOW static void throtl_track_latency(struct throtl_data *td, sector_t size, - int op, unsigned long time) + enum req_op op, unsigned long time) { + const bool rw = op_is_write(op); struct latency_bucket *latency; int index; @@ -2215,10 +2216,10 @@ static void throtl_track_latency(struct throtl_data *td, sector_t size, index = request_bucket_index(size); - latency = get_cpu_ptr(td->latency_buckets[op]); + latency = get_cpu_ptr(td->latency_buckets[rw]); latency[index].total_latency += time; latency[index].samples++; - put_cpu_ptr(td->latency_buckets[op]); + put_cpu_ptr(td->latency_buckets[rw]); } void blk_throtl_stat_add(struct request *rq, u64 time_ns)