]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
SUNRPC: Remove svc_fill_write_vector()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 8 May 2025 15:56:40 +0000 (11:56 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 15 May 2025 20:16:25 +0000 (16:16 -0400)
Clean up: This API is no longer used.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/svc.h
net/sunrpc/svc.c

index dec636345ee22c3990845b9d623b7ee28e91209b..510ee192797718e2724ece9b81f7c5feafc8b8d4 100644 (file)
@@ -470,8 +470,6 @@ const char *           svc_proc_name(const struct svc_rqst *rqstp);
 int               svc_encode_result_payload(struct svc_rqst *rqstp,
                                             unsigned int offset,
                                             unsigned int length);
-unsigned int      svc_fill_write_vector(struct svc_rqst *rqstp,
-                                        const struct xdr_buf *payload);
 char             *svc_fill_symlink_pathname(struct svc_rqst *rqstp,
                                             struct kvec *first, void *p,
                                             size_t total);
index a8861a80bc04c5d4cbfe4cec038411439ff2674c..939b6239df8ab6229ce34836d77d3a6b983fbbb7 100644 (file)
@@ -1719,46 +1719,6 @@ int svc_encode_result_payload(struct svc_rqst *rqstp, unsigned int offset,
 }
 EXPORT_SYMBOL_GPL(svc_encode_result_payload);
 
-/**
- * svc_fill_write_vector - Construct data argument for VFS write call
- * @rqstp: svc_rqst to operate on
- * @payload: xdr_buf containing only the write data payload
- *
- * Fills in rqstp::rq_vec, and returns the number of elements.
- */
-unsigned int svc_fill_write_vector(struct svc_rqst *rqstp,
-                                  const struct xdr_buf *payload)
-{
-       const struct kvec *first = payload->head;
-       struct page **pages = payload->pages;
-       struct kvec *vec = rqstp->rq_vec;
-       size_t total = payload->len;
-       unsigned int i;
-
-       /* Some types of transport can present the write payload
-        * entirely in rq_arg.pages. In this case, @first is empty.
-        */
-       i = 0;
-       if (first->iov_len) {
-               vec[i].iov_base = first->iov_base;
-               vec[i].iov_len = min_t(size_t, total, first->iov_len);
-               total -= vec[i].iov_len;
-               ++i;
-       }
-
-       while (total) {
-               vec[i].iov_base = page_address(*pages);
-               vec[i].iov_len = min_t(size_t, total, PAGE_SIZE);
-               total -= vec[i].iov_len;
-               ++i;
-               ++pages;
-       }
-
-       WARN_ON_ONCE(i > ARRAY_SIZE(rqstp->rq_vec));
-       return i;
-}
-EXPORT_SYMBOL_GPL(svc_fill_write_vector);
-
 /**
  * svc_fill_symlink_pathname - Construct pathname argument for VFS symlink call
  * @rqstp: svc_rqst to operate on