s390/cio: fix length calculation in idset.c

bitmap_or uses the number of bits as its length parameter and
not the number of words necessary to store those bits.

This fixes a regression introduced by:
	aa92b33 s390/cio: use generic bitmap functions

Reported-by: Christian Ehrhardt <[email protected]>
Acked-by: Peter Oberparleiter <[email protected]>
Signed-off-by: Sebastian Ott <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
Sebastian Ott 2012-11-06 15:10:05 +01:00 • committed by Martin Schwidefsky
commit 7f0bc6c0d4

View file

@ -125,8 +125,7 @@ int idset_is_empty(struct idset *set)
void idset_add_set(struct idset *to, struct idset *from)
{
int len = min(__BITOPS_WORDS(to->num_ssid * to->num_id),
__BITOPS_WORDS(from->num_ssid * from->num_id));
int len = min(to->num_ssid * to->num_id, from->num_ssid * from->num_id);
bitmap_or(to->bitmap, to->bitmap, from->bitmap, len);
}