Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d074242 authored by Jiri Olsa's avatar Jiri Olsa Committed by Linus Torvalds
Browse files

uml: use DIV_ROUND_UP



I just saw similar patches in the janitor kernel's list, and spotted place it
fits.

Signed-off-by: default avatarJiri Olsa <olsajiri@gmail.com>
Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 63b9871f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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];