@@ -3057,81 +3057,6 @@ static inline vm_fault_t vmf_error(int err)
3057
3057
struct page * follow_page (struct vm_area_struct * vma , unsigned long address ,
3058
3058
unsigned int foll_flags );
3059
3059
3060
- #define FOLL_WRITE 0x01 /* check pte is writable */
3061
- #define FOLL_TOUCH 0x02 /* mark page accessed */
3062
- #define FOLL_GET 0x04 /* do get_page on page */
3063
- #define FOLL_DUMP 0x08 /* give error on hole if it would be zero */
3064
- #define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */
3065
- #define FOLL_NOWAIT 0x20 /* if a disk transfer is needed, start the IO
3066
- * and return without waiting upon it */
3067
- #define FOLL_NOFAULT 0x80 /* do not fault in pages */
3068
- #define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */
3069
- #define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */
3070
- #define FOLL_REMOTE 0x2000 /* we are working on non-current tsk/mm */
3071
- #define FOLL_ANON 0x8000 /* don't do file mappings */
3072
- #define FOLL_LONGTERM 0x10000 /* mapping lifetime is indefinite: see below */
3073
- #define FOLL_SPLIT_PMD 0x20000 /* split huge pmd before returning */
3074
- #define FOLL_PIN 0x40000 /* pages must be released via unpin_user_page */
3075
- #define FOLL_FAST_ONLY 0x80000 /* gup_fast: prevent fall-back to slow gup */
3076
- #define FOLL_PCI_P2PDMA 0x100000 /* allow returning PCI P2PDMA pages */
3077
- #define FOLL_INTERRUPTIBLE 0x200000 /* allow interrupts from generic signals */
3078
-
3079
- /*
3080
- * FOLL_PIN and FOLL_LONGTERM may be used in various combinations with each
3081
- * other. Here is what they mean, and how to use them:
3082
- *
3083
- * FOLL_LONGTERM indicates that the page will be held for an indefinite time
3084
- * period _often_ under userspace control. This is in contrast to
3085
- * iov_iter_get_pages(), whose usages are transient.
3086
- *
3087
- * FIXME: For pages which are part of a filesystem, mappings are subject to the
3088
- * lifetime enforced by the filesystem and we need guarantees that longterm
3089
- * users like RDMA and V4L2 only establish mappings which coordinate usage with
3090
- * the filesystem. Ideas for this coordination include revoking the longterm
3091
- * pin, delaying writeback, bounce buffer page writeback, etc. As FS DAX was
3092
- * added after the problem with filesystems was found FS DAX VMAs are
3093
- * specifically failed. Filesystem pages are still subject to bugs and use of
3094
- * FOLL_LONGTERM should be avoided on those pages.
3095
- *
3096
- * FIXME: Also NOTE that FOLL_LONGTERM is not supported in every GUP call.
3097
- * Currently only get_user_pages() and get_user_pages_fast() support this flag
3098
- * and calls to get_user_pages_[un]locked are specifically not allowed. This
3099
- * is due to an incompatibility with the FS DAX check and
3100
- * FAULT_FLAG_ALLOW_RETRY.
3101
- *
3102
- * In the CMA case: long term pins in a CMA region would unnecessarily fragment
3103
- * that region. And so, CMA attempts to migrate the page before pinning, when
3104
- * FOLL_LONGTERM is specified.
3105
- *
3106
- * FOLL_PIN indicates that a special kind of tracking (not just page->_refcount,
3107
- * but an additional pin counting system) will be invoked. This is intended for
3108
- * anything that gets a page reference and then touches page data (for example,
3109
- * Direct IO). This lets the filesystem know that some non-file-system entity is
3110
- * potentially changing the pages' data. In contrast to FOLL_GET (whose pages
3111
- * are released via put_page()), FOLL_PIN pages must be released, ultimately, by
3112
- * a call to unpin_user_page().
3113
- *
3114
- * FOLL_PIN is similar to FOLL_GET: both of these pin pages. They use different
3115
- * and separate refcounting mechanisms, however, and that means that each has
3116
- * its own acquire and release mechanisms:
3117
- *
3118
- * FOLL_GET: get_user_pages*() to acquire, and put_page() to release.
3119
- *
3120
- * FOLL_PIN: pin_user_pages*() to acquire, and unpin_user_pages to release.
3121
- *
3122
- * FOLL_PIN and FOLL_GET are mutually exclusive for a given function call.
3123
- * (The underlying pages may experience both FOLL_GET-based and FOLL_PIN-based
3124
- * calls applied to them, and that's perfectly OK. This is a constraint on the
3125
- * callers, not on the pages.)
3126
- *
3127
- * FOLL_PIN should be set internally by the pin_user_pages*() APIs, never
3128
- * directly by the caller. That's in order to help avoid mismatches when
3129
- * releasing pages: get_user_pages*() pages must be released via put_page(),
3130
- * while pin_user_pages*() pages must be released via unpin_user_page().
3131
- *
3132
- * Please see Documentation/core-api/pin_user_pages.rst for more information.
3133
- */
3134
-
3135
3060
static inline int vm_fault_to_errno (vm_fault_t vm_fault , int foll_flags )
3136
3061
{
3137
3062
if (vm_fault & VM_FAULT_OOM )
0 commit comments