The patch titled eCryptfs: Use generic_file_splice_read() has been added to the -mm tree. Its filename is ecryptfs-use-generic_file_splice_read.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: eCryptfs: Use generic_file_splice_read() From: Michael Halcrow <mhalcrow@xxxxxxxxxx> eCryptfs is currently just passing through splice reads to the lower filesystem. This is obviously incorrect behavior; the decrypted data is what needs to be read, not the lower encrypted data. I cannot think of any good reason for eCryptfs to implement splice_read, so this patch points the eCryptfs fops splice_read to use generic_file_splice_read. Signed-off-by: Michael Halcrow <mhalcrow@xxxxxxxxxx> Cc: Jens Axboe <jens.axboe@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ecryptfs/file.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff -puN fs/ecryptfs/file.c~ecryptfs-use-generic_file_splice_read fs/ecryptfs/file.c --- a/fs/ecryptfs/file.c~ecryptfs-use-generic_file_splice_read +++ a/fs/ecryptfs/file.c @@ -338,21 +338,6 @@ static int ecryptfs_fasync(int fd, struc return rc; } -static ssize_t ecryptfs_splice_read(struct file *file, loff_t * ppos, - struct pipe_inode_info *pipe, size_t count, - unsigned int flags) -{ - struct file *lower_file = NULL; - int rc = -EINVAL; - - lower_file = ecryptfs_file_to_lower(file); - if (lower_file->f_op && lower_file->f_op->splice_read) - rc = lower_file->f_op->splice_read(lower_file, ppos, pipe, - count, flags); - - return rc; -} - static int ecryptfs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); @@ -365,7 +350,7 @@ const struct file_operations ecryptfs_di .release = ecryptfs_release, .fsync = ecryptfs_fsync, .fasync = ecryptfs_fasync, - .splice_read = ecryptfs_splice_read, + .splice_read = generic_file_splice_read, }; const struct file_operations ecryptfs_main_fops = { @@ -382,7 +367,7 @@ const struct file_operations ecryptfs_ma .release = ecryptfs_release, .fsync = ecryptfs_fsync, .fasync = ecryptfs_fasync, - .splice_read = ecryptfs_splice_read, + .splice_read = generic_file_splice_read, }; static int _ Patches currently in -mm which might be from mhalcrow@xxxxxxxxxx are documentation-00-index-notice-ecryptfstxt-moved.patch git-unionfs.patch fs-remove-some-aop_truncated_page.patch ecryptfs-add-key-list-structure-search-keyring.patch ecryptfs-use-list_for_each_entry_safe-when-wiping-auth-toks.patch ecryptfs-kmem_cache-objects-for-multiple-keys-init-exit-functions.patch ecryptfs-fix-tag-1-parsing-code.patch ecryptfs-fix-tag-3-parsing-code.patch ecryptfs-fix-tag-11-parsing-code.patch ecryptfs-fix-tag-11-writing-code.patch ecryptfs-update-comment-and-debug-statement.patch ecryptfs-printk-warning-fixes.patch ecryptfs-remove-unnecessary-bug_on.patch ecryptfs-collapse-flag-set-into-one-statement.patch ecryptfs-grammatical-fix-destruct-to-destroy.patch ecryptfs-comments-for-some-structs.patch ecryptfs-kerneldoc-fixes-for-cryptoc-and-keystorec.patch ecryptfs-remove-unnecessary-variable-initializations.patch ecryptfs-make-needlessly-global-symbols-static.patch ecryptfs-use-generic_file_splice_read.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html