summaryrefslogtreecommitdiff
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-16 21:04:48 (GMT)
committerIngo Molnar <mingo@elte.hu>2008-12-16 21:04:48 (GMT)
commit78f902ccc597d6ce3e8d1477d70f2d79e960ba7a (patch)
treec6ceab663de16501d1dda1c1596fe2dacaaef8e3 /drivers/md/linear.c
parent9ee670fd87b7d69c8633b94c42aadcbbcb96f28e (diff)
parent8b1fae4e4200388b64dd88065639413cb3f1051c (diff)
downloadlinux-fsl-qoriq-78f902ccc597d6ce3e8d1477d70f2d79e960ba7a.tar.xz
Merge commit 'v2.6.28-rc8' into x86/doc
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r--drivers/md/linear.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 190147c..3b90c5c 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -148,6 +148,8 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
min_sectors = conf->array_sectors;
sector_div(min_sectors, PAGE_SIZE/sizeof(struct dev_info *));
+ if (min_sectors == 0)
+ min_sectors = 1;
/* min_sectors is the minimum spacing that will fit the hash
* table in one PAGE. This may be much smaller than needed.