diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2008-10-21 12:44:57 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2008-10-21 12:44:57 -0400 |
commit | d63a5ce3c0d25c96bdadc78792e5b48b846e899d (patch) | |
tree | ac46375b47f784dff17d1e657d5115b45ad86844 /drivers/md/dm-raid1.c | |
parent | 7acedc5b98a2fcff64f00c21110aae7d3ac2f7df (diff) |
dm: publish array_too_big
Move array_too_big to include/linux/device-mapper.h because it is
used by targets.
Remove the test from dm-raid1 as the number of mirror legs is limited
such that it can never fail. (Even for stripes it seems rather
unlikely.)
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid1.c')
-rw-r--r-- | drivers/md/dm-raid1.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 29913e42c4ab..ecfd82169cb3 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -1315,9 +1315,6 @@ static struct mirror_set *alloc_context(unsigned int nr_mirrors, | |||
1315 | size_t len; | 1315 | size_t len; |
1316 | struct mirror_set *ms = NULL; | 1316 | struct mirror_set *ms = NULL; |
1317 | 1317 | ||
1318 | if (array_too_big(sizeof(*ms), sizeof(ms->mirror[0]), nr_mirrors)) | ||
1319 | return NULL; | ||
1320 | |||
1321 | len = sizeof(*ms) + (sizeof(ms->mirror[0]) * nr_mirrors); | 1318 | len = sizeof(*ms) + (sizeof(ms->mirror[0]) * nr_mirrors); |
1322 | 1319 | ||
1323 | ms = kzalloc(len, GFP_KERNEL); | 1320 | ms = kzalloc(len, GFP_KERNEL); |