diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2012-11-06 09:10:05 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-11-06 16:39:54 -0500 |
commit | 7f0bc6c0d45497a0191e99426785954bcbda3c6c (patch) | |
tree | 3f83b9970a965fc93e50c885fc44840b28402022 | |
parent | 99e639b791f5cfae0b8d42f5fe6c1e8839932bea (diff) |
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 <ehrhardt@linux.vnet.ibm.com>
Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/cio/idset.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/cio/idset.c b/drivers/s390/cio/idset.c index 199bc6791177..65d13e38803f 100644 --- a/drivers/s390/cio/idset.c +++ b/drivers/s390/cio/idset.c | |||
@@ -125,8 +125,7 @@ int idset_is_empty(struct idset *set) | |||
125 | 125 | ||
126 | void idset_add_set(struct idset *to, struct idset *from) | 126 | void idset_add_set(struct idset *to, struct idset *from) |
127 | { | 127 | { |
128 | int len = min(__BITOPS_WORDS(to->num_ssid * to->num_id), | 128 | int len = min(to->num_ssid * to->num_id, from->num_ssid * from->num_id); |
129 | __BITOPS_WORDS(from->num_ssid * from->num_id)); | ||
130 | 129 | ||
131 | bitmap_or(to->bitmap, to->bitmap, from->bitmap, len); | 130 | bitmap_or(to->bitmap, to->bitmap, from->bitmap, len); |
132 | } | 131 | } |