[FIX] linux<=2.6 compiling failed
authorAnastasia Lyupa <a.lyupa@samsung.com>
Tue, 9 Apr 2013 12:31:21 +0000 (16:31 +0400)
committerAnastasia Lyupa <a.lyupa@samsung.com>
Tue, 9 Apr 2013 12:31:21 +0000 (16:31 +0400)
Start reparing. Move follow_page_uprobe() under linux-version>=3.8.

kprobe/dbi_kprobes_deps.c

index d44e23b..0c5bc9d 100644 (file)
@@ -381,6 +381,13 @@ static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long add
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
 
+static inline struct page *follow_page_uprobe(struct vm_area_struct *vma,
+        unsigned long address, unsigned int foll_flags)
+{
+    unsigned int unused_page_mask;
+    return follow_page_mask(vma, address, foll_flags, &unused_page_mask);
+}
+
 long __get_user_pages_uprobe(struct task_struct *tsk, struct mm_struct *mm,
                unsigned long start, unsigned long nr_pages,
                unsigned int gup_flags, struct page **pages,
@@ -788,13 +795,6 @@ next_page:
 
 #else /* LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38) */
 
-static inline struct page *follow_page_uprobe(struct vm_area_struct *vma,
-        unsigned long address, unsigned int foll_flags)
-{
-    unsigned int unused_page_mask;
-    return follow_page_mask(vma, address, foll_flags, &unused_page_mask);
-}
-
 static int __get_user_pages_uprobe(struct task_struct *tsk, struct mm_struct *mm,
                unsigned long start, int len, int flags,
                struct page **pages, struct vm_area_struct **vmas)