]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/vmalloc.h
svc: Add a max payload value to the transport
[linux-2.6-omap-h63xx.git] / include / linux / vmalloc.h
index c2b10cae5da52d06bf9c62a36aae5d36e24df6d4..89338b468d0de9c90d857e7e6154ecebcd3bc598 100644 (file)
@@ -58,6 +58,13 @@ void vmalloc_sync_all(void);
 /*
  *     Lowlevel-APIs (not for driver use!)
  */
+
+static inline size_t get_vm_area_size(const struct vm_struct *area)
+{
+       /* return actual size without guard page */
+       return area->size - PAGE_SIZE;
+}
+
 extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
 extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
                                        unsigned long start, unsigned long end);