diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index c504e8389e69e3ab9ad717b9f83d0c19c2008d68..65285211568ff69d72dd6ef18bd97cad735ab6ea 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1319,7 +1319,7 @@ static void make_request(struct mddev *mddev, struct bio * bio) /* Could not read all from this device, so we will * need another r10_bio. */ - sectors_handled = (r10_bio->sectors + max_sectors + sectors_handled = (r10_bio->sector + max_sectors - bio->bi_sector); r10_bio->sectors = max_sectors; spin_lock_irq(&conf->device_lock); @@ -1327,7 +1327,7 @@ static void make_request(struct mddev *mddev, struct bio * bio) bio->bi_phys_segments = 2; else bio->bi_phys_segments++; - spin_unlock(&conf->device_lock); + spin_unlock_irq(&conf->device_lock); /* Cannot call generic_make_request directly * as that will be queued in __generic_make_request * and subsequent mempool_alloc might block