[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080425175617.GA11204@c2.user-mode-linux.org>
Date: Fri, 25 Apr 2008 13:56:17 -0400
From: Jeff Dike <jdike@...toit.com>
To: Andrew Morton <akpm@...l.org>, LKML <linux-kernel@...r.kernel.org>,
uml-devel <user-mode-linux-devel@...ts.sourceforge.net>
Cc: Jiri Olsa <olsajiri@...il.com>
Subject: [PATCH 17/19] UML - use DIV_ROUND_UP
From: Jiri Olsa <olsajiri@...il.com>
I just saw similar patches in the janitor kernel's list,
and spotted place it fits.
Signed-off-by: Jiri Olsa <olsajiri@...il.com>
Signed-off-by: Jeff Dike <jdike@...ux.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];
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists