|
@@ -1178,8 +1178,8 @@ static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask,
|
|
|
* by one word. Thanks to Lynn Kerby for the fix and James McMechan
|
|
|
* for the original diagnosis.
|
|
|
*/
|
|
|
- if(*cow_offset == ((bitmap_len + sizeof(unsigned long) - 1) /
|
|
|
- sizeof(unsigned long) - 1))
|
|
|
+ if (*cow_offset == (DIV_ROUND_UP(bitmap_len,
|
|
|
+ sizeof(unsigned long)) - 1))
|
|
|
(*cow_offset)--;
|
|
|
|
|
|
bitmap_words[0] = bitmap[*cow_offset];
|