Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
[linux-block.git] / kernel / relay.c
index 5001c9887db1a3ea22cb03d5dd843b1a44a2e1c5..5a56d3c8dc03a799e5f53169c85c7f33f05727eb 100644 (file)
@@ -227,7 +227,7 @@ static void relay_destroy_buf(struct rchan_buf *buf)
  *     relay_remove_buf - remove a channel buffer
  *     @kref: target kernel reference that contains the relay buffer
  *
- *     Removes the file from the fileystem, which also frees the
+ *     Removes the file from the filesystem, which also frees the
  *     rchan_buf_struct and the channel buffer.  Should only be called from
  *     kref_put().
  */
@@ -1195,8 +1195,6 @@ static void relay_pipe_buf_release(struct pipe_inode_info *pipe,
 
 static const struct pipe_buf_operations relay_pipe_buf_ops = {
        .can_merge = 0,
-       .map = generic_pipe_buf_map,
-       .unmap = generic_pipe_buf_unmap,
        .confirm = generic_pipe_buf_confirm,
        .release = relay_pipe_buf_release,
        .steal = generic_pipe_buf_steal,
@@ -1253,7 +1251,7 @@ static ssize_t subbuf_splice_actor(struct file *in,
        subbuf_pages = rbuf->chan->alloc_size >> PAGE_SHIFT;
        pidx = (read_start / PAGE_SIZE) % subbuf_pages;
        poff = read_start & ~PAGE_MASK;
-       nr_pages = min_t(unsigned int, subbuf_pages, pipe->buffers);
+       nr_pages = min_t(unsigned int, subbuf_pages, spd.nr_pages_max);
 
        for (total_len = 0; spd.nr_pages < nr_pages; spd.nr_pages++) {
                unsigned int this_len, this_end, private;