Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
[sfrench/cifs-2.6.git] / arch / arm / mm / vmregion.c
index 19e09bdb1b8a4ea3e4d892f8ab753eee25d6cd0b..935993e1b1ef53f5372344cbc6a5c764186557b9 100644 (file)
@@ -35,7 +35,8 @@
  */
 
 struct arm_vmregion *
-arm_vmregion_alloc(struct arm_vmregion_head *head, size_t size, gfp_t gfp)
+arm_vmregion_alloc(struct arm_vmregion_head *head, size_t align,
+                  size_t size, gfp_t gfp)
 {
        unsigned long addr = head->vm_start, end = head->vm_end - size;
        unsigned long flags;
@@ -58,7 +59,7 @@ arm_vmregion_alloc(struct arm_vmregion_head *head, size_t size, gfp_t gfp)
                        goto nospc;
                if ((addr + size) <= c->vm_start)
                        goto found;
-               addr = c->vm_end;
+               addr = ALIGN(c->vm_end, align);
                if (addr > end)
                        goto nospc;
        }