* [PATCH 17/19] UML - use DIV_ROUND_UP
@ 2008-04-25 17:56 Jeff Dike
0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2008-04-25 17:56 UTC (permalink / raw)
To: Andrew Morton, LKML, uml-devel; +Cc: Jiri Olsa
From: Jiri Olsa <olsajiri@gmail.com>
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>
---
arch/um/drivers/ubd_kern.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6-git/arch/um/drivers/ubd_kern.c
===================================================================
--- linux-2.6-git.orig/arch/um/drivers/ubd_kern.c 2008-04-24 16:51:07.000000000 -0400
+++ linux-2.6-git/arch/um/drivers/ubd_kern.c 2008-04-24 17:06:17.000000000 -0400
@@ -1004,8 +1004,8 @@ static void cowify_bitmap(__u64 io_offse
* 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];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-25 18:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-25 17:56 [PATCH 17/19] UML - use DIV_ROUND_UP Jeff Dike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox