diff options
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ac6c96431bbc..4979b6675717 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/pagemap.h> | 31 | #include <linux/pagemap.h> |
32 | #include <linux/uio.h> | 32 | #include <linux/uio.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/pipe_fs_i.h> | 34 | #include <linux/splice.h> |
35 | #include <linux/mount.h> | 35 | #include <linux/mount.h> |
36 | #include <linux/writeback.h> | 36 | #include <linux/writeback.h> |
37 | 37 | ||
@@ -1583,7 +1583,7 @@ static int ocfs2_splice_write_actor(struct pipe_inode_info *pipe, | |||
1583 | ssize_t copied = 0; | 1583 | ssize_t copied = 0; |
1584 | struct ocfs2_splice_write_priv sp; | 1584 | struct ocfs2_splice_write_priv sp; |
1585 | 1585 | ||
1586 | ret = buf->ops->pin(pipe, buf); | 1586 | ret = buf->ops->confirm(pipe, buf); |
1587 | if (ret) | 1587 | if (ret) |
1588 | goto out; | 1588 | goto out; |
1589 | 1589 | ||
@@ -1604,7 +1604,7 @@ static int ocfs2_splice_write_actor(struct pipe_inode_info *pipe, | |||
1604 | * might enter ocfs2_buffered_write_cluster() more | 1604 | * might enter ocfs2_buffered_write_cluster() more |
1605 | * than once, so keep track of our progress here. | 1605 | * than once, so keep track of our progress here. |
1606 | */ | 1606 | */ |
1607 | copied = ocfs2_buffered_write_cluster(sd->file, | 1607 | copied = ocfs2_buffered_write_cluster(sd->u.file, |
1608 | (loff_t)sd->pos + total, | 1608 | (loff_t)sd->pos + total, |
1609 | count, | 1609 | count, |
1610 | ocfs2_map_and_write_splice_data, | 1610 | ocfs2_map_and_write_splice_data, |
@@ -1636,9 +1636,14 @@ static ssize_t __ocfs2_file_splice_write(struct pipe_inode_info *pipe, | |||
1636 | int ret, err; | 1636 | int ret, err; |
1637 | struct address_space *mapping = out->f_mapping; | 1637 | struct address_space *mapping = out->f_mapping; |
1638 | struct inode *inode = mapping->host; | 1638 | struct inode *inode = mapping->host; |
1639 | 1639 | struct splice_desc sd = { | |
1640 | ret = __splice_from_pipe(pipe, out, ppos, len, flags, | 1640 | .total_len = len, |
1641 | ocfs2_splice_write_actor); | 1641 | .flags = flags, |
1642 | .pos = *ppos, | ||
1643 | .u.file = out, | ||
1644 | }; | ||
1645 | |||
1646 | ret = __splice_from_pipe(pipe, &sd, ocfs2_splice_write_actor); | ||
1642 | if (ret > 0) { | 1647 | if (ret > 0) { |
1643 | *ppos += ret; | 1648 | *ppos += ret; |
1644 | 1649 | ||
@@ -1817,7 +1822,6 @@ const struct inode_operations ocfs2_special_file_iops = { | |||
1817 | const struct file_operations ocfs2_fops = { | 1822 | const struct file_operations ocfs2_fops = { |
1818 | .read = do_sync_read, | 1823 | .read = do_sync_read, |
1819 | .write = do_sync_write, | 1824 | .write = do_sync_write, |
1820 | .sendfile = generic_file_sendfile, | ||
1821 | .mmap = ocfs2_mmap, | 1825 | .mmap = ocfs2_mmap, |
1822 | .fsync = ocfs2_sync_file, | 1826 | .fsync = ocfs2_sync_file, |
1823 | .release = ocfs2_file_release, | 1827 | .release = ocfs2_file_release, |