Commit 0d7aeb68 authored by David Howells's avatar David Howells Committed by Paolo Abeni

Drop the netfs_ prefix from netfs_extract_iter_to_sg()

Rename netfs_extract_iter_to_sg() and its auxiliary functions to drop the
netfs_ prefix.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: Steve French <sfrench@samba.org>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: Jens Axboe <axboe@kernel.dk>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: linux-crypto@vger.kernel.org
cc: linux-cachefs@redhat.com
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: netdev@vger.kernel.org
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent b62d9e20
...@@ -106,7 +106,7 @@ EXPORT_SYMBOL_GPL(netfs_extract_user_iter); ...@@ -106,7 +106,7 @@ EXPORT_SYMBOL_GPL(netfs_extract_user_iter);
* Extract and pin a list of up to sg_max pages from UBUF- or IOVEC-class * Extract and pin a list of up to sg_max pages from UBUF- or IOVEC-class
* iterators, and add them to the scatterlist. * iterators, and add them to the scatterlist.
*/ */
static ssize_t netfs_extract_user_to_sg(struct iov_iter *iter, static ssize_t extract_user_to_sg(struct iov_iter *iter,
ssize_t maxsize, ssize_t maxsize,
struct sg_table *sgtable, struct sg_table *sgtable,
unsigned int sg_max, unsigned int sg_max,
...@@ -159,7 +159,7 @@ static ssize_t netfs_extract_user_to_sg(struct iov_iter *iter, ...@@ -159,7 +159,7 @@ static ssize_t netfs_extract_user_to_sg(struct iov_iter *iter,
* Extract up to sg_max pages from a BVEC-type iterator and add them to the * Extract up to sg_max pages from a BVEC-type iterator and add them to the
* scatterlist. The pages are not pinned. * scatterlist. The pages are not pinned.
*/ */
static ssize_t netfs_extract_bvec_to_sg(struct iov_iter *iter, static ssize_t extract_bvec_to_sg(struct iov_iter *iter,
ssize_t maxsize, ssize_t maxsize,
struct sg_table *sgtable, struct sg_table *sgtable,
unsigned int sg_max, unsigned int sg_max,
...@@ -205,7 +205,7 @@ static ssize_t netfs_extract_bvec_to_sg(struct iov_iter *iter, ...@@ -205,7 +205,7 @@ static ssize_t netfs_extract_bvec_to_sg(struct iov_iter *iter,
* scatterlist. This can deal with vmalloc'd buffers as well as kmalloc'd or * scatterlist. This can deal with vmalloc'd buffers as well as kmalloc'd or
* static buffers. The pages are not pinned. * static buffers. The pages are not pinned.
*/ */
static ssize_t netfs_extract_kvec_to_sg(struct iov_iter *iter, static ssize_t extract_kvec_to_sg(struct iov_iter *iter,
ssize_t maxsize, ssize_t maxsize,
struct sg_table *sgtable, struct sg_table *sgtable,
unsigned int sg_max, unsigned int sg_max,
...@@ -266,7 +266,7 @@ static ssize_t netfs_extract_kvec_to_sg(struct iov_iter *iter, ...@@ -266,7 +266,7 @@ static ssize_t netfs_extract_kvec_to_sg(struct iov_iter *iter,
* Extract up to sg_max folios from an XARRAY-type iterator and add them to * Extract up to sg_max folios from an XARRAY-type iterator and add them to
* the scatterlist. The pages are not pinned. * the scatterlist. The pages are not pinned.
*/ */
static ssize_t netfs_extract_xarray_to_sg(struct iov_iter *iter, static ssize_t extract_xarray_to_sg(struct iov_iter *iter,
ssize_t maxsize, ssize_t maxsize,
struct sg_table *sgtable, struct sg_table *sgtable,
unsigned int sg_max, unsigned int sg_max,
...@@ -312,7 +312,7 @@ static ssize_t netfs_extract_xarray_to_sg(struct iov_iter *iter, ...@@ -312,7 +312,7 @@ static ssize_t netfs_extract_xarray_to_sg(struct iov_iter *iter,
} }
/** /**
* netfs_extract_iter_to_sg - Extract pages from an iterator and add ot an sglist * extract_iter_to_sg - Extract pages from an iterator and add ot an sglist
* @iter: The iterator to extract from * @iter: The iterator to extract from
* @maxsize: The amount of iterator to copy * @maxsize: The amount of iterator to copy
* @sgtable: The scatterlist table to fill in * @sgtable: The scatterlist table to fill in
...@@ -339,7 +339,7 @@ static ssize_t netfs_extract_xarray_to_sg(struct iov_iter *iter, ...@@ -339,7 +339,7 @@ static ssize_t netfs_extract_xarray_to_sg(struct iov_iter *iter,
* The iov_iter_extract_mode() function should be used to query how cleanup * The iov_iter_extract_mode() function should be used to query how cleanup
* should be performed. * should be performed.
*/ */
ssize_t netfs_extract_iter_to_sg(struct iov_iter *iter, size_t maxsize, ssize_t extract_iter_to_sg(struct iov_iter *iter, size_t maxsize,
struct sg_table *sgtable, unsigned int sg_max, struct sg_table *sgtable, unsigned int sg_max,
iov_iter_extraction_t extraction_flags) iov_iter_extraction_t extraction_flags)
{ {
...@@ -349,16 +349,16 @@ ssize_t netfs_extract_iter_to_sg(struct iov_iter *iter, size_t maxsize, ...@@ -349,16 +349,16 @@ ssize_t netfs_extract_iter_to_sg(struct iov_iter *iter, size_t maxsize,
switch (iov_iter_type(iter)) { switch (iov_iter_type(iter)) {
case ITER_UBUF: case ITER_UBUF:
case ITER_IOVEC: case ITER_IOVEC:
return netfs_extract_user_to_sg(iter, maxsize, sgtable, sg_max, return extract_user_to_sg(iter, maxsize, sgtable, sg_max,
extraction_flags); extraction_flags);
case ITER_BVEC: case ITER_BVEC:
return netfs_extract_bvec_to_sg(iter, maxsize, sgtable, sg_max, return extract_bvec_to_sg(iter, maxsize, sgtable, sg_max,
extraction_flags); extraction_flags);
case ITER_KVEC: case ITER_KVEC:
return netfs_extract_kvec_to_sg(iter, maxsize, sgtable, sg_max, return extract_kvec_to_sg(iter, maxsize, sgtable, sg_max,
extraction_flags); extraction_flags);
case ITER_XARRAY: case ITER_XARRAY:
return netfs_extract_xarray_to_sg(iter, maxsize, sgtable, sg_max, return extract_xarray_to_sg(iter, maxsize, sgtable, sg_max,
extraction_flags); extraction_flags);
default: default:
pr_err("%s(%u) unsupported\n", __func__, iov_iter_type(iter)); pr_err("%s(%u) unsupported\n", __func__, iov_iter_type(iter));
...@@ -366,4 +366,4 @@ ssize_t netfs_extract_iter_to_sg(struct iov_iter *iter, size_t maxsize, ...@@ -366,4 +366,4 @@ ssize_t netfs_extract_iter_to_sg(struct iov_iter *iter, size_t maxsize,
return -EIO; return -EIO;
} }
} }
EXPORT_SYMBOL_GPL(netfs_extract_iter_to_sg); EXPORT_SYMBOL_GPL(extract_iter_to_sg);
...@@ -4333,7 +4333,7 @@ static void *smb2_get_aead_req(struct crypto_aead *tfm, struct smb_rqst *rqst, ...@@ -4333,7 +4333,7 @@ static void *smb2_get_aead_req(struct crypto_aead *tfm, struct smb_rqst *rqst,
} }
sgtable.orig_nents = sgtable.nents; sgtable.orig_nents = sgtable.nents;
rc = netfs_extract_iter_to_sg(iter, count, &sgtable, rc = extract_iter_to_sg(iter, count, &sgtable,
num_sgs - sgtable.nents, 0); num_sgs - sgtable.nents, 0);
iov_iter_revert(iter, rc); iov_iter_revert(iter, rc);
sgtable.orig_nents = sgtable.nents; sgtable.orig_nents = sgtable.nents;
......
...@@ -2227,7 +2227,7 @@ static int smbd_iter_to_mr(struct smbd_connection *info, ...@@ -2227,7 +2227,7 @@ static int smbd_iter_to_mr(struct smbd_connection *info,
memset(sgt->sgl, 0, max_sg * sizeof(struct scatterlist)); memset(sgt->sgl, 0, max_sg * sizeof(struct scatterlist));
ret = netfs_extract_iter_to_sg(iter, iov_iter_count(iter), sgt, max_sg, 0); ret = extract_iter_to_sg(iter, iov_iter_count(iter), sgt, max_sg, 0);
WARN_ON(ret < 0); WARN_ON(ret < 0);
if (sgt->nents > 0) if (sgt->nents > 0)
sg_mark_end(&sgt->sgl[sgt->nents - 1]); sg_mark_end(&sgt->sgl[sgt->nents - 1]);
......
...@@ -301,7 +301,7 @@ ssize_t netfs_extract_user_iter(struct iov_iter *orig, size_t orig_len, ...@@ -301,7 +301,7 @@ ssize_t netfs_extract_user_iter(struct iov_iter *orig, size_t orig_len,
struct iov_iter *new, struct iov_iter *new,
iov_iter_extraction_t extraction_flags); iov_iter_extraction_t extraction_flags);
struct sg_table; struct sg_table;
ssize_t netfs_extract_iter_to_sg(struct iov_iter *iter, size_t len, ssize_t extract_iter_to_sg(struct iov_iter *iter, size_t len,
struct sg_table *sgtable, unsigned int sg_max, struct sg_table *sgtable, unsigned int sg_max,
iov_iter_extraction_t extraction_flags); iov_iter_extraction_t extraction_flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment