.. | .. |
---|
415 | 415 | /* |
---|
416 | 416 | * Work out how many "unsigned long"s we need to hold the bitset. |
---|
417 | 417 | */ |
---|
418 | | - bitset_size = dm_round_up(region_count, |
---|
419 | | - sizeof(*lc->clean_bits) << BYTE_SHIFT); |
---|
| 418 | + bitset_size = dm_round_up(region_count, BITS_PER_LONG); |
---|
420 | 419 | bitset_size >>= BYTE_SHIFT; |
---|
421 | 420 | |
---|
422 | 421 | lc->bitset_uint32_count = bitset_size / sizeof(*lc->clean_bits); |
---|
.. | .. |
---|
616 | 615 | log_clear_bit(lc, lc->clean_bits, i); |
---|
617 | 616 | |
---|
618 | 617 | /* clear any old bits -- device has shrunk */ |
---|
619 | | - for (i = lc->region_count; i % (sizeof(*lc->clean_bits) << BYTE_SHIFT); i++) |
---|
| 618 | + for (i = lc->region_count; i % BITS_PER_LONG; i++) |
---|
620 | 619 | log_clear_bit(lc, lc->clean_bits, i); |
---|
621 | 620 | |
---|
622 | 621 | /* copy clean across to sync */ |
---|