Skip to content

Commit

Permalink
bury skb_copy_to_page()
Browse files Browse the repository at this point in the history
no callers since 3.0

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Nov 19, 2014
1 parent 08adb7d commit 232365f
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -1884,29 +1884,6 @@ static inline int skb_copy_to_page_nocache(struct sock *sk, char __user *from,
return 0;
}

static inline int skb_copy_to_page(struct sock *sk, char __user *from,
struct sk_buff *skb, struct page *page,
int off, int copy)
{
if (skb->ip_summed == CHECKSUM_NONE) {
int err = 0;
__wsum csum = csum_and_copy_from_user(from,
page_address(page) + off,
copy, 0, &err);
if (err)
return err;
skb->csum = csum_block_add(skb->csum, csum, skb->len);
} else if (copy_from_user(page_address(page) + off, from, copy))
return -EFAULT;

skb->len += copy;
skb->data_len += copy;
skb->truesize += copy;
sk->sk_wmem_queued += copy;
sk_mem_charge(sk, copy);
return 0;
}

/**
* sk_wmem_alloc_get - returns write allocations
* @sk: socket
Expand Down

0 comments on commit 232365f

Please sign in to comment.