summaryrefslogtreecommitdiff
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-05-22 13:11:11 +0100
committerJakub Kicinski <kuba@kernel.org>2023-05-23 20:48:27 -0700
commit96449f90240713bd9bd653d6b15266a1044cfa7b (patch)
treef9b649089c1dbbabb68eb687ffe61edd2b376631 /net/ipv4/ip_output.c
parentb841b901c452d92610f739a36e54978453528876 (diff)
net: Pass max frags into skb_append_pagefrags()
Pass the maximum number of fragments into skb_append_pagefrags() rather than using MAX_SKB_FRAGS so that it can be used from code that wants to specify sysctl_max_skb_frags. Signed-off-by: David Howells <dhowells@redhat.com> cc: David Ahern <dsahern@kernel.org> cc: Jens Axboe <axboe@kernel.dk> cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 61892268e8a6..52fc840898d8 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1450,7 +1450,8 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
if (len > size)
len = size;
- if (skb_append_pagefrags(skb, page, offset, len)) {
+ if (skb_append_pagefrags(skb, page, offset, len,
+ MAX_SKB_FRAGS)) {
err = -EMSGSIZE;
goto error;
}