Fix to prevent a useless message during session inialization.

Without the patch, if the highest possible node bit in the
node_states[N_ONLINE] multi-word bitmask is set, then a message
such as "crash: next_online_node: 256 is too large!" will be
displayed.
(anderson@redhat.com)
This commit is contained in:
Dave Anderson 2017-10-11 16:11:34 -04:00
parent da9bd35afc
commit 9e5255af26

View File

@ -17200,10 +17200,8 @@ next_online_node(int first)
int i, j, node;
ulong mask, *maskptr;
if ((first/BITS_PER_LONG) >= vt->node_online_map_len) {
error(INFO, "next_online_node: %d is too large!\n", first);
if ((first/BITS_PER_LONG) >= vt->node_online_map_len)
return -1;
}
maskptr = (ulong *)vt->node_online_map;
for (i = node = 0; i < vt->node_online_map_len; i++, maskptr++) {