diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-10 17:30:00 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-19 16:24:35 -0500 |
commit | 232365f660b0016dcf618723707f91f4a95013db (patch) | |
tree | 559fc034d4b6a602335a077f040de6d22502eeca /include/net/sock.h | |
parent | 08adb7dabd4874cc5666b4490653b26534702ce0 (diff) |
bury skb_copy_to_page()
no callers since 3.0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 83a669f83bae..df9b89bce8ff 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1884,29 +1884,6 @@ static inline int skb_copy_to_page_nocache(struct sock *sk, char __user *from, | |||
1884 | return 0; | 1884 | return 0; |
1885 | } | 1885 | } |
1886 | 1886 | ||
1887 | static inline int skb_copy_to_page(struct sock *sk, char __user *from, | ||
1888 | struct sk_buff *skb, struct page *page, | ||
1889 | int off, int copy) | ||
1890 | { | ||
1891 | if (skb->ip_summed == CHECKSUM_NONE) { | ||
1892 | int err = 0; | ||
1893 | __wsum csum = csum_and_copy_from_user(from, | ||
1894 | page_address(page) + off, | ||
1895 | copy, 0, &err); | ||
1896 | if (err) | ||
1897 | return err; | ||
1898 | skb->csum = csum_block_add(skb->csum, csum, skb->len); | ||
1899 | } else if (copy_from_user(page_address(page) + off, from, copy)) | ||
1900 | return -EFAULT; | ||
1901 | |||
1902 | skb->len += copy; | ||
1903 | skb->data_len += copy; | ||
1904 | skb->truesize += copy; | ||
1905 | sk->sk_wmem_queued += copy; | ||
1906 | sk_mem_charge(sk, copy); | ||
1907 | return 0; | ||
1908 | } | ||
1909 | |||
1910 | /** | 1887 | /** |
1911 | * sk_wmem_alloc_get - returns write allocations | 1888 | * sk_wmem_alloc_get - returns write allocations |
1912 | * @sk: socket | 1889 | * @sk: socket |