summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-04-11 13:52:07 +0200
committerJens Axboe <axboe@suse.de>2006-04-11 13:52:07 +0200
commitb92ce55893745e011edae70830b8bc863be881f9 (patch)
treee2afd62d2e63d74157905140f5907d07bdfe31b9 /kernel
parent529565dcb1581c9a1e3f6df1c1763ca3e0f0d512 (diff)
downloadop-kernel-dev-b92ce55893745e011edae70830b8bc863be881f9.zip
op-kernel-dev-b92ce55893745e011edae70830b8bc863be881f9.tar.gz
[PATCH] splice: add direct fd <-> fd splicing support
It's more efficient for sendfile() emulation. Basically we cache an internal private pipe and just use that as the intermediate area for pages. Direct splicing is not available from sys_splice(), it is only meant to be used for sendfile() emulation. Additional patch from Ingo Molnar to avoid the PIPE_BUFFERS loop at exit for the normal fast path. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 6c2eeb8..1a9787a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -34,6 +34,7 @@
#include <linux/mutex.h>
#include <linux/futex.h>
#include <linux/compat.h>
+#include <linux/pipe_fs_i.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
@@ -941,6 +942,9 @@ fastcall NORET_TYPE void do_exit(long code)
if (tsk->io_context)
exit_io_context();
+ if (tsk->splice_pipe)
+ __free_pipe_info(tsk->splice_pipe);
+
/* PF_DEAD causes final put_task_struct after we schedule. */
preempt_disable();
BUG_ON(tsk->flags & PF_DEAD);
OpenPOWER on IntegriCloud