fuse: fix pipe_buf_operations
[pandora-kernel.git] / net / core / skbuff.c
index af9c3c6..5d6cb54 100644 (file)
 static struct kmem_cache *skbuff_head_cache __read_mostly;
 static struct kmem_cache *skbuff_fclone_cache __read_mostly;
 
-static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
-                                 struct pipe_buffer *buf)
-{
-       put_page(buf->page);
-}
-
-static void sock_pipe_buf_get(struct pipe_inode_info *pipe,
-                               struct pipe_buffer *buf)
-{
-       get_page(buf->page);
-}
-
-static int sock_pipe_buf_steal(struct pipe_inode_info *pipe,
-                              struct pipe_buffer *buf)
-{
-       return 1;
-}
-
-
-/* Pipe buffer operations for a socket. */
-static const struct pipe_buf_operations sock_pipe_buf_ops = {
-       .can_merge = 0,
-       .map = generic_pipe_buf_map,
-       .unmap = generic_pipe_buf_unmap,
-       .confirm = generic_pipe_buf_confirm,
-       .release = sock_pipe_buf_release,
-       .steal = sock_pipe_buf_steal,
-       .get = sock_pipe_buf_get,
-};
-
 /*
  *     Keep out-of-line to prevent kernel bloat.
  *     __builtin_return_address is not used because it is not always
@@ -1665,7 +1635,7 @@ int skb_splice_bits(struct sk_buff *skb, unsigned int offset,
                .partial = partial,
                .nr_pages_max = MAX_SKB_FRAGS,
                .flags = flags,
-               .ops = &sock_pipe_buf_ops,
+               .ops = &nosteal_pipe_buf_ops,
                .spd_release = sock_spd_release,
        };
        struct sk_buff *frag_iter;