aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/aoe
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r--drivers/block/aoe/aoecmd.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 84c03d65dcc..17eed8c025d 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -756,16 +756,17 @@ diskstats(struct gendisk *disk, struct bio *bio, ulong duration, sector_t sector
unsigned long n_sect = bio->bi_size >> 9;
const int rw = bio_data_dir(bio);
struct hd_struct *part;
+ int cpu;
- rcu_read_lock();
-
+ cpu = disk_stat_lock();
part = disk_map_sector_rcu(disk, sector);
- all_stat_inc(disk, part, ios[rw], sector);
- all_stat_add(disk, part, ticks[rw], duration, sector);
- all_stat_add(disk, part, sectors[rw], n_sect, sector);
- all_stat_add(disk, part, io_ticks, duration, sector);
- rcu_read_unlock();
+ all_stat_inc(cpu, disk, part, ios[rw], sector);
+ all_stat_add(cpu, disk, part, ticks[rw], duration, sector);
+ all_stat_add(cpu, disk, part, sectors[rw], n_sect, sector);
+ all_stat_add(cpu, disk, part, io_ticks, duration, sector);
+
+ disk_stat_unlock();
}
void