Skip to content

Commit b406c6b

Browse files
committed
SUNRPC: Remove svc_fill_write_vector()
Clean up: This API is no longer used. Signed-off-by: Chuck Lever <[email protected]>
1 parent 1969823 commit b406c6b

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

include/linux/sunrpc/svc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,6 @@ const char * svc_proc_name(const struct svc_rqst *rqstp);
470470
int svc_encode_result_payload(struct svc_rqst *rqstp,
471471
unsigned int offset,
472472
unsigned int length);
473-
unsigned int svc_fill_write_vector(struct svc_rqst *rqstp,
474-
const struct xdr_buf *payload);
475473
char *svc_fill_symlink_pathname(struct svc_rqst *rqstp,
476474
struct kvec *first, void *p,
477475
size_t total);

net/sunrpc/svc.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,46 +1719,6 @@ int svc_encode_result_payload(struct svc_rqst *rqstp, unsigned int offset,
17191719
}
17201720
EXPORT_SYMBOL_GPL(svc_encode_result_payload);
17211721

1722-
/**
1723-
* svc_fill_write_vector - Construct data argument for VFS write call
1724-
* @rqstp: svc_rqst to operate on
1725-
* @payload: xdr_buf containing only the write data payload
1726-
*
1727-
* Fills in rqstp::rq_vec, and returns the number of elements.
1728-
*/
1729-
unsigned int svc_fill_write_vector(struct svc_rqst *rqstp,
1730-
const struct xdr_buf *payload)
1731-
{
1732-
const struct kvec *first = payload->head;
1733-
struct page **pages = payload->pages;
1734-
struct kvec *vec = rqstp->rq_vec;
1735-
size_t total = payload->len;
1736-
unsigned int i;
1737-
1738-
/* Some types of transport can present the write payload
1739-
* entirely in rq_arg.pages. In this case, @first is empty.
1740-
*/
1741-
i = 0;
1742-
if (first->iov_len) {
1743-
vec[i].iov_base = first->iov_base;
1744-
vec[i].iov_len = min_t(size_t, total, first->iov_len);
1745-
total -= vec[i].iov_len;
1746-
++i;
1747-
}
1748-
1749-
while (total) {
1750-
vec[i].iov_base = page_address(*pages);
1751-
vec[i].iov_len = min_t(size_t, total, PAGE_SIZE);
1752-
total -= vec[i].iov_len;
1753-
++i;
1754-
++pages;
1755-
}
1756-
1757-
WARN_ON_ONCE(i > ARRAY_SIZE(rqstp->rq_vec));
1758-
return i;
1759-
}
1760-
EXPORT_SYMBOL_GPL(svc_fill_write_vector);
1761-
17621722
/**
17631723
* svc_fill_symlink_pathname - Construct pathname argument for VFS symlink call
17641724
* @rqstp: svc_rqst to operate on

0 commit comments

Comments
 (0)