Lines Matching refs:memfd
8 #include <linux/memfd.h>
3411 * memfd_pin_folios() - pin folios associated with a memfd
3412 * @memfd: the memfd whose folios are to be pinned
3413 * @start: the first memfd offset
3414 * @end: the last memfd offset (inclusive)
3419 * Attempt to pin folios associated with a memfd in the contiguous range
3420 * [start, end]. Given that a memfd is either backed by shmem or hugetlb,
3436 long memfd_pin_folios(struct file *memfd, loff_t start, loff_t end,
3451 if (!memfd)
3454 if (!shmem_file(memfd) && !is_file_hugepages(memfd))
3457 if (end >= i_size_read(file_inode(memfd)))
3460 if (is_file_hugepages(memfd)) {
3461 h = hstate_file(memfd);
3470 if (is_file_hugepages(memfd)) {
3483 nr_found = filemap_get_folios_contig(memfd->f_mapping,
3512 folio = memfd_alloc_folio(memfd, start_idx);