summaryrefslogtreecommitdiff
path: root/arch/um/drivers/ubd_kern.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-05-17 17:12:24 +0200
committerThomas Gleixner <tglx@linutronix.de>2008-05-17 17:12:24 +0200
commit538f0fd0f210c2ce5c585799f18d0e5c7cf6155e (patch)
treee9fa2b10ce5d92ac6bcd8ac55af1cd97bda3ec5d /arch/um/drivers/ubd_kern.c
parent3bb6fbf9969a8bbe4892968659239273d092e78a (diff)
parentf26a3988917913b3d11b2bd741601a2c64ab9204 (diff)
Merge branch 'linus' into x86/garttip-x86-gart-2008-05-17-15-12-25
Diffstat (limited to 'arch/um/drivers/ubd_kern.c')
-rw-r--r--arch/um/drivers/ubd_kern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 5e45e39a8a8d..44ad1607be2d 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -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];