diff options
author | Jens Axboe <axboe@suse.de> | 2006-04-11 08:57:50 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-04-11 09:47:07 -0400 |
commit | cbb7e577e732f576b9f399bc2600bdc0626c68dc (patch) | |
tree | 55e3d65c9d9fb5b0ee25d0ccabf951de6da2db7b /include | |
parent | 2514395ef88b46e895726a8d40966cb83de7940c (diff) |
[PATCH] splice: pass offset around for ->splice_read() and ->splice_write()
We need not use ->f_pos as the offset for the file input/output. If the
user passed an offset pointer in through sys_splice(), just use that and
leave ->f_pos alone.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 162c6e57307a..3de2bfb2410f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1039,8 +1039,8 @@ struct file_operations { | |||
1039 | int (*check_flags)(int); | 1039 | int (*check_flags)(int); |
1040 | int (*dir_notify)(struct file *filp, unsigned long arg); | 1040 | int (*dir_notify)(struct file *filp, unsigned long arg); |
1041 | int (*flock) (struct file *, int, struct file_lock *); | 1041 | int (*flock) (struct file *, int, struct file_lock *); |
1042 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); | 1042 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); |
1043 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); | 1043 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); |
1044 | }; | 1044 | }; |
1045 | 1045 | ||
1046 | struct inode_operations { | 1046 | struct inode_operations { |
@@ -1613,13 +1613,13 @@ extern void do_generic_mapping_read(struct address_space *mapping, | |||
1613 | loff_t *, read_descriptor_t *, read_actor_t); | 1613 | loff_t *, read_descriptor_t *, read_actor_t); |
1614 | 1614 | ||
1615 | /* fs/splice.c */ | 1615 | /* fs/splice.c */ |
1616 | extern ssize_t generic_file_splice_read(struct file *, | 1616 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
1617 | struct pipe_inode_info *, size_t, unsigned int); | 1617 | struct pipe_inode_info *, size_t, unsigned int); |
1618 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, | 1618 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, |
1619 | struct file *, size_t, unsigned int); | 1619 | struct file *, loff_t *, size_t, unsigned int); |
1620 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | 1620 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, |
1621 | struct file *out, size_t len, unsigned int flags); | 1621 | struct file *out, loff_t *, size_t len, unsigned int flags); |
1622 | extern long do_splice_direct(struct file *in, struct file *out, | 1622 | extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, |
1623 | size_t len, unsigned int flags); | 1623 | size_t len, unsigned int flags); |
1624 | 1624 | ||
1625 | extern void | 1625 | extern void |