]> err.no Git - linux-2.6/blobdiff - fs/ecryptfs/file.c
ocfs2: Unlock mutex in local alloc failure case
[linux-2.6] / fs / ecryptfs / file.c
index 59288d817078879ad36c1ece17a51208488d571e..94f456fe4d9b70487686a707b9954d49895a3fb4 100644 (file)
@@ -338,16 +338,17 @@ static int ecryptfs_fasync(int fd, struct file *file, int flag)
        return rc;
 }
 
-static ssize_t ecryptfs_sendfile(struct file *file, loff_t * ppos,
-                                size_t count, read_actor_t actor, void *target)
+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->sendfile)
-               rc = lower_file->f_op->sendfile(lower_file, ppos, count,
-                                               actor, target);
+       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;
 }
@@ -364,7 +365,7 @@ const struct file_operations ecryptfs_dir_fops = {
        .release = ecryptfs_release,
        .fsync = ecryptfs_fsync,
        .fasync = ecryptfs_fasync,
-       .sendfile = ecryptfs_sendfile,
+       .splice_read = ecryptfs_splice_read,
 };
 
 const struct file_operations ecryptfs_main_fops = {
@@ -381,7 +382,7 @@ const struct file_operations ecryptfs_main_fops = {
        .release = ecryptfs_release,
        .fsync = ecryptfs_fsync,
        .fasync = ecryptfs_fasync,
-       .sendfile = ecryptfs_sendfile,
+       .splice_read = ecryptfs_splice_read,
 };
 
 static int