aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r--drivers/md/dm-raid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index a002dd85db1e..86df8b2cf927 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -449,7 +449,7 @@ static int parse_raid_params(struct raid_set *rs, char **argv,
449 rs->ti->error = "write_mostly option is only valid for RAID1"; 449 rs->ti->error = "write_mostly option is only valid for RAID1";
450 return -EINVAL; 450 return -EINVAL;
451 } 451 }
452 if (value > rs->md.raid_disks) { 452 if (value >= rs->md.raid_disks) {
453 rs->ti->error = "Invalid write_mostly drive index given"; 453 rs->ti->error = "Invalid write_mostly drive index given";
454 return -EINVAL; 454 return -EINVAL;
455 } 455 }