]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
splice: split up __splice_from_pipe()
authorMiklos Szeredi <miklos@szeredi.hu>
Tue, 14 Apr 2009 17:48:36 +0000 (19:48 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 May 2009 23:35:21 +0000 (16:35 -0700)
commit5d1dfedd7906f57927c354e2434d21d3a59ef755
tree04cd56fea64f81bf36c665d483a6fb207e6f4b5c
parentd42024748006cf393ca817f6e6eb90ccba439b3f
splice: split up __splice_from_pipe()

commit b3c2d2ddd63944ef2a1e4a43077b602288107e01 upstream.

Split up __splice_from_pipe() into four helper functions:

  splice_from_pipe_begin()
  splice_from_pipe_next()
  splice_from_pipe_feed()
  splice_from_pipe_end()

splice_from_pipe_next() will wait (if necessary) for more buffers to
be added to the pipe.  splice_from_pipe_feed() will feed the buffers
to the supplied actor and return when there's no more data available
(or if all of the requested data has been copied).

This is necessary so that implementations can do locking around the
non-waiting splice_from_pipe_feed().

This patch should not cause any change in behavior.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/splice.c
include/linux/splice.h