n_pages = size >> PAGE_SHIFT;
for(i=0;i<n_pages;i++){
- if(remap_page_range(start, __pa(async->buf_page_list[i]),
+ if(REMAP_PAGE_RANGE(vma, start, __pa(async->buf_page_list[i]),
PAGE_SIZE, PAGE_SHARED)){
return -EAGAIN;
}
#define VM_OFFSET(a) ((a)->vm_pgoff * PAGE_SIZE)
#endif
+#if LINUX_VERSION_CODE < 0x020500
+#define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(b,c,d,e)
+#else
+#define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(a,b,c,d,e)
+#endif
+
#include_next <linux/mm.h>
#endif /* _COMPAT_MM_H */