mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
uml: use DIV_ROUND_UP
I just saw similar patches in the janitor kernel's list, and spotted place it fits. Signed-off-by: Jiri Olsa <olsajiri@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
63b9871f6e
commit
6d0742426c
1 changed files with 2 additions and 2 deletions
|
@ -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
|
* by one word. Thanks to Lynn Kerby for the fix and James McMechan
|
||||||
* for the original diagnosis.
|
* for the original diagnosis.
|
||||||
*/
|
*/
|
||||||
if(*cow_offset == ((bitmap_len + sizeof(unsigned long) - 1) /
|
if (*cow_offset == (DIV_ROUND_UP(bitmap_len,
|
||||||
sizeof(unsigned long) - 1))
|
sizeof(unsigned long)) - 1))
|
||||||
(*cow_offset)--;
|
(*cow_offset)--;
|
||||||
|
|
||||||
bitmap_words[0] = bitmap[*cow_offset];
|
bitmap_words[0] = bitmap[*cow_offset];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue