Fix the new ROUND_UP macro.

It was missing a "- 1".

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2012-03-22 19:40:38 +11:00
parent c07d640009
commit 2d762ade6a
1 changed files with 1 additions and 1 deletions

View File

@ -1252,7 +1252,7 @@ static inline int dev2minor(int d)
return (-1-d) << MdpMinorShift;
}
#define _ROUND_UP(val, base) (((val) + (base)) & ~(base - 1))
#define _ROUND_UP(val, base) (((val) + (base) - 1) & ~(base - 1))
#define ROUND_UP(val, base) _ROUND_UP(val, (typeof(val))(base))
#define ROUND_UP_PTR(ptr, base) ((typeof(ptr)) \
(ROUND_UP((unsigned long)(ptr), base)))