]> git.baikalelectronics.ru Git - kernel.git/commit
splice: fix kmaps in default_file_splice_write()
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 19 May 2009 09:37:46 +0000 (11:37 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 19 May 2009 09:37:46 +0000 (11:37 +0200)
commite543aa0beaa6a4a994be23c51013f3e9b12fa312
tree87bd9ecead14418c44320e2944a0178af64af9ea
parentf0eeb50bcf8e4663853da89ff82a093b1d91b234
splice: fix kmaps in default_file_splice_write()

Unfortunately multiple kmap() within a single thread are deadlockable,
so writing out multiple buffers with writev() isn't possible.

Change the implementation so that it does a separate write() for each
buffer.  This actually simplifies the code a lot since the
splice_from_pipe() helper can be used.

This limitation is caused by HIGHMEM pages, and so only affects a
subset of architectures and configurations.  In the future it may be
worth to implement default_file_splice_write() in a more efficient way
on configs that allow it.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/splice.c