From: Edward Shishkin Specify splice_read, splice_write file operations for loopback functionality. Signed-off-by: Edward Shishkin Cc: Jens Axboe Signed-off-by: Andrew Morton --- fs/reiser4/plugin/file/cryptcompress.c | 3 ++- fs/reiser4/plugin/object.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff -puN fs/reiser4/plugin/file/cryptcompress.c~reiser4-specify-splice-file-operations fs/reiser4/plugin/file/cryptcompress.c --- a/fs/reiser4/plugin/file/cryptcompress.c~reiser4-specify-splice-file-operations +++ a/fs/reiser4/plugin/file/cryptcompress.c @@ -3747,13 +3747,14 @@ int release_cryptcompress(struct inode * int prepare_write_cryptcompress(struct file *file, struct page *page, unsigned from, unsigned to) { - return 0; + return -EINVAL; } /* plugin->commit_write */ int commit_write_cryptcompress(struct file *file, struct page *page, unsigned from, unsigned to) { + BUG(); return 0; } diff -puN fs/reiser4/plugin/object.c~reiser4-specify-splice-file-operations fs/reiser4/plugin/object.c --- a/fs/reiser4/plugin/object.c~reiser4-specify-splice-file-operations +++ a/fs/reiser4/plugin/object.c @@ -103,7 +103,9 @@ static struct file_operations regular_fi .mmap = reiser4_mmap_careful, .open = reiser4_open_careful, .release = reiser4_release_careful, - .fsync = reiser4_sync_file_common + .fsync = reiser4_sync_file_common, + .splice_read = generic_file_splice_read, + .splice_write = generic_file_splice_write }; static struct address_space_operations regular_file_a_ops = { .writepage = reiser4_writepage, _