iov_iter: remove iov_iter_get_pages and iov_iter_get_pages_alloc
Now that the direct I/O helpers have switched to use iov_iter_extract_pages, these helpers are unused. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Christian Brauner <brauner@kernel.org> Reviewed-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20230614140341.521331-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
e4cc64657b
commit
84bd06c632
|
@ -277,14 +277,8 @@ void iov_iter_bvec(struct iov_iter *i, unsigned int direction, const struct bio_
|
|||
void iov_iter_discard(struct iov_iter *i, unsigned int direction, size_t count);
|
||||
void iov_iter_xarray(struct iov_iter *i, unsigned int direction, struct xarray *xarray,
|
||||
loff_t start, size_t count);
|
||||
ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages,
|
||||
size_t maxsize, unsigned maxpages, size_t *start,
|
||||
iov_iter_extraction_t extraction_flags);
|
||||
ssize_t iov_iter_get_pages2(struct iov_iter *i, struct page **pages,
|
||||
size_t maxsize, unsigned maxpages, size_t *start);
|
||||
ssize_t iov_iter_get_pages_alloc(struct iov_iter *i,
|
||||
struct page ***pages, size_t maxsize, size_t *start,
|
||||
iov_iter_extraction_t extraction_flags);
|
||||
ssize_t iov_iter_get_pages_alloc2(struct iov_iter *i, struct page ***pages,
|
||||
size_t maxsize, size_t *start);
|
||||
int iov_iter_npages(const struct iov_iter *i, int maxpages);
|
||||
|
|
|
@ -1082,8 +1082,7 @@ static struct page *first_bvec_segment(const struct iov_iter *i,
|
|||
|
||||
static ssize_t __iov_iter_get_pages_alloc(struct iov_iter *i,
|
||||
struct page ***pages, size_t maxsize,
|
||||
unsigned int maxpages, size_t *start,
|
||||
iov_iter_extraction_t extraction_flags)
|
||||
unsigned int maxpages, size_t *start)
|
||||
{
|
||||
unsigned int n, gup_flags = 0;
|
||||
|
||||
|
@ -1093,8 +1092,6 @@ static ssize_t __iov_iter_get_pages_alloc(struct iov_iter *i,
|
|||
return 0;
|
||||
if (maxsize > MAX_RW_COUNT)
|
||||
maxsize = MAX_RW_COUNT;
|
||||
if (extraction_flags & ITER_ALLOW_P2PDMA)
|
||||
gup_flags |= FOLL_PCI_P2PDMA;
|
||||
|
||||
if (likely(user_backed_iter(i))) {
|
||||
unsigned long addr;
|
||||
|
@ -1144,49 +1141,31 @@ static ssize_t __iov_iter_get_pages_alloc(struct iov_iter *i,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
ssize_t iov_iter_get_pages(struct iov_iter *i,
|
||||
struct page **pages, size_t maxsize, unsigned maxpages,
|
||||
size_t *start, iov_iter_extraction_t extraction_flags)
|
||||
ssize_t iov_iter_get_pages2(struct iov_iter *i, struct page **pages,
|
||||
size_t maxsize, unsigned maxpages, size_t *start)
|
||||
{
|
||||
if (!maxpages)
|
||||
return 0;
|
||||
BUG_ON(!pages);
|
||||
|
||||
return __iov_iter_get_pages_alloc(i, &pages, maxsize, maxpages,
|
||||
start, extraction_flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iov_iter_get_pages);
|
||||
|
||||
ssize_t iov_iter_get_pages2(struct iov_iter *i, struct page **pages,
|
||||
size_t maxsize, unsigned maxpages, size_t *start)
|
||||
{
|
||||
return iov_iter_get_pages(i, pages, maxsize, maxpages, start, 0);
|
||||
return __iov_iter_get_pages_alloc(i, &pages, maxsize, maxpages, start);
|
||||
}
|
||||
EXPORT_SYMBOL(iov_iter_get_pages2);
|
||||
|
||||
ssize_t iov_iter_get_pages_alloc(struct iov_iter *i,
|
||||
struct page ***pages, size_t maxsize,
|
||||
size_t *start, iov_iter_extraction_t extraction_flags)
|
||||
ssize_t iov_iter_get_pages_alloc2(struct iov_iter *i,
|
||||
struct page ***pages, size_t maxsize, size_t *start)
|
||||
{
|
||||
ssize_t len;
|
||||
|
||||
*pages = NULL;
|
||||
|
||||
len = __iov_iter_get_pages_alloc(i, pages, maxsize, ~0U, start,
|
||||
extraction_flags);
|
||||
len = __iov_iter_get_pages_alloc(i, pages, maxsize, ~0U, start);
|
||||
if (len <= 0) {
|
||||
kvfree(*pages);
|
||||
*pages = NULL;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iov_iter_get_pages_alloc);
|
||||
|
||||
ssize_t iov_iter_get_pages_alloc2(struct iov_iter *i,
|
||||
struct page ***pages, size_t maxsize, size_t *start)
|
||||
{
|
||||
return iov_iter_get_pages_alloc(i, pages, maxsize, start, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(iov_iter_get_pages_alloc2);
|
||||
|
||||
size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum,
|
||||
|
|
Loading…
Reference in New Issue