900-remove_get_user_pages-tmp-fix.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Index: compat-wireless-2017-01-31/backport-include/linux/mm.h
  2. ===================================================================
  3. --- compat-wireless-2017-01-31.orig/backport-include/linux/mm.h
  4. +++ compat-wireless-2017-01-31/backport-include/linux/mm.h
  5. @@ -27,45 +27,6 @@
  6. void kvfree(const void *addr);
  7. #endif /* < 3.15 */
  8. -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,20,0))
  9. -#define get_user_pages_locked LINUX_BACKPORT(get_user_pages_locked)
  10. -long get_user_pages_locked(unsigned long start, unsigned long nr_pages,
  11. - int write, int force, struct page **pages, int *locked);
  12. -#define get_user_pages_unlocked LINUX_BACKPORT(get_user_pages_unlocked)
  13. -long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
  14. - int write, int force, struct page **pages);
  15. -#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0))
  16. -static inline
  17. -long backport_get_user_pages_locked(unsigned long start, unsigned long nr_pages,
  18. - int write, int force, struct page **pages, int *locked)
  19. -{
  20. - return get_user_pages_locked(current, current->mm, start, nr_pages,
  21. - write, force, pages, locked);
  22. -}
  23. -#define get_user_pages_locked LINUX_BACKPORT(get_user_pages_locked)
  24. -
  25. -static inline
  26. -long backport_get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
  27. - int write, int force, struct page **pages)
  28. -{
  29. - return get_user_pages_unlocked(current, current->mm, start, nr_pages,
  30. - write, force, pages);
  31. -}
  32. -#define get_user_pages_unlocked LINUX_BACKPORT(get_user_pages_unlocked)
  33. -#endif
  34. -
  35. -#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0))
  36. -static inline
  37. -long backport_get_user_pages(unsigned long start, unsigned long nr_pages,
  38. - int write, int force, struct page **pages,
  39. - struct vm_area_struct **vmas)
  40. -{
  41. - return get_user_pages(current, current->mm, start, nr_pages,
  42. - write, force, pages, vmas);
  43. -}
  44. -#define get_user_pages LINUX_BACKPORT(get_user_pages)
  45. -#endif
  46. -
  47. #ifndef FOLL_TRIED
  48. #define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */
  49. #endif