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@us.ibm.com>
--- linux-2.6.23-rc4-mm1.orig/fs/ecryptfs/file.c
+++ linux-2.6.23-rc4-mm1/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
-
| Satyam Sharma | Re: 2.6.23-rc6-mm1 |
| Robin Lee Powell | NFS hang + umount -f: better behaviour requested. |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Michal Piotrowski | Re: 2.6.22-rc4-mm2 |
git: | |
| Shawn Pearce | Re: [RFC] Submodules in GIT |
| Linus Torvalds | People unaware of the importance of "git gc"? |
| Martin Langhoff | Handling large files with GIT |
| Pierre Habouzit | [PATCH] git-revert is one of the most misunderstood command in git, help users out. |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Douglas A. Tutty | OBSD's perspective on SELinux |
| askthelist | Packets Per Second Limit? |
| Christophe Rioux | OpenBSD as host for VMWare Server |
| Daniel J Blueman | [sky2, solved] transmit timeouts and firmware update... |
| Octavian Purdila | [RFC] support for IEEE 1588 |
| Johann Baudy | Packet mmap: TX RING and zero copy |
| Evgeniy Polyakov | [resend take 2 0/4] Distributed storage. |
