diff options
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index c4779ccba1c3..182f5a94cdc5 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -147,6 +147,7 @@ static int multipath_make_request (struct request_queue *q, struct bio * bio) | |||
147 | struct multipath_bh * mp_bh; | 147 | struct multipath_bh * mp_bh; |
148 | struct multipath_info *multipath; | 148 | struct multipath_info *multipath; |
149 | const int rw = bio_data_dir(bio); | 149 | const int rw = bio_data_dir(bio); |
150 | int cpu; | ||
150 | 151 | ||
151 | if (unlikely(bio_barrier(bio))) { | 152 | if (unlikely(bio_barrier(bio))) { |
152 | bio_endio(bio, -EOPNOTSUPP); | 153 | bio_endio(bio, -EOPNOTSUPP); |
@@ -158,8 +159,10 @@ static int multipath_make_request (struct request_queue *q, struct bio * bio) | |||
158 | mp_bh->master_bio = bio; | 159 | mp_bh->master_bio = bio; |
159 | mp_bh->mddev = mddev; | 160 | mp_bh->mddev = mddev; |
160 | 161 | ||
161 | disk_stat_inc(mddev->gendisk, ios[rw]); | 162 | cpu = disk_stat_lock(); |
162 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); | 163 | disk_stat_inc(cpu, mddev->gendisk, ios[rw]); |
164 | disk_stat_add(cpu, mddev->gendisk, sectors[rw], bio_sectors(bio)); | ||
165 | disk_stat_unlock(); | ||
163 | 166 | ||
164 | mp_bh->path = multipath_map(conf); | 167 | mp_bh->path = multipath_map(conf); |
165 | if (mp_bh->path < 0) { | 168 | if (mp_bh->path < 0) { |