Skip to content

Commit 211a766

Browse files
committed
Revert "mm/gup: reintroduce pin_user_pages_fast_only()"
This reverts commit ef467f3. This helper is no longer used by the FIPS-mode RNG, which was the motivation for reintroducing it. Remove it. Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
1 parent be9d59e commit 211a766

2 files changed

Lines changed: 0 additions & 30 deletions

File tree

include/linux/mm.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,8 +2625,6 @@ int get_user_pages_fast(unsigned long start, int nr_pages,
26252625
unsigned int gup_flags, struct page **pages);
26262626
int pin_user_pages_fast(unsigned long start, int nr_pages,
26272627
unsigned int gup_flags, struct page **pages);
2628-
int pin_user_pages_fast_only(unsigned long start, int nr_pages,
2629-
unsigned int gup_flags, struct page **pages);
26302628
void folio_add_pin(struct folio *folio);
26312629

26322630
int account_locked_vm(struct mm_struct *mm, unsigned long pages, bool inc);

mm/gup.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3327,34 +3327,6 @@ int pin_user_pages_fast(unsigned long start, int nr_pages,
33273327
}
33283328
EXPORT_SYMBOL_GPL(pin_user_pages_fast);
33293329

3330-
/**
3331-
* pin_user_pages_fast_only() - pin user pages in memory
3332-
* @start: starting user address
3333-
* @nr_pages: number of pages from start to pin
3334-
* @gup_flags: flags modifying pin behaviour
3335-
* @pages: array that receives pointers to the pages pinned.
3336-
* Should be at least nr_pages long.
3337-
*
3338-
* Like pin_user_pages_fast() except it's IRQ-safe in that it won't fall back to
3339-
* the regular GUP.
3340-
*
3341-
* If the architecture does not support this function, simply return with no
3342-
* pages pinned.
3343-
*
3344-
* Careful, careful! COW breaking can go either way, so a non-write
3345-
* access can get ambiguous page results. If you call this function without
3346-
* 'write' set, you'd better be sure that you're ok with that ambiguity.
3347-
*/
3348-
int pin_user_pages_fast_only(unsigned long start, int nr_pages,
3349-
unsigned int gup_flags, struct page **pages)
3350-
{
3351-
if (!is_valid_gup_args(pages, NULL, &gup_flags,
3352-
FOLL_PIN | FOLL_FAST_ONLY))
3353-
return -EINVAL;
3354-
return gup_fast_fallback(start, nr_pages, gup_flags, pages);
3355-
}
3356-
EXPORT_SYMBOL_GPL(pin_user_pages_fast_only);
3357-
33583330
/**
33593331
* pin_user_pages_remote() - pin pages of a remote process
33603332
*

0 commit comments

Comments
 (0)