aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid5.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 7fb97c65ad37..be4e62f611bc 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4336,7 +4336,8 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
4336 return ERR_PTR(-EINVAL); 4336 return ERR_PTR(-EINVAL);
4337 } 4337 }
4338 4338
4339 if (!mddev->new_chunk || mddev->new_chunk % PAGE_SIZE) { 4339 if (!mddev->new_chunk || mddev->new_chunk % PAGE_SIZE ||
4340 !is_power_of_2(mddev->new_chunk)) {
4340 printk(KERN_ERR "raid5: invalid chunk size %d for %s\n", 4341 printk(KERN_ERR "raid5: invalid chunk size %d for %s\n",
4341 mddev->new_chunk, mdname(mddev)); 4342 mddev->new_chunk, mdname(mddev));
4342 return ERR_PTR(-EINVAL); 4343 return ERR_PTR(-EINVAL);