summaryrefslogtreecommitdiff
path: root/fs/xfs/linux-2.6/xfs_file.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-04-11 14:57:50 +0200
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-04-11 15:47:07 +0200
commitcbb7e577e732f576b9f399bc2600bdc0626c68dc (patch)
tree55e3d65c9d9fb5b0ee25d0ccabf951de6da2db7b /fs/xfs/linux-2.6/xfs_file.c
parent2514395ef88b46e895726a8d40966cb83de7940c (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 'fs/xfs/linux-2.6/xfs_file.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index 269721af02f3..c847416f6d10 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -252,6 +252,7 @@ xfs_file_sendfile_invis(
STATIC ssize_t
xfs_file_splice_read(
struct file *infilp,
+ loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len,
unsigned int flags)
@@ -259,13 +260,14 @@ xfs_file_splice_read(
vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode);
ssize_t rval;
- VOP_SPLICE_READ(vp, infilp, pipe, len, flags, 0, NULL, rval);
+ VOP_SPLICE_READ(vp, infilp, ppos, pipe, len, flags, 0, NULL, rval);
return rval;
}
STATIC ssize_t
xfs_file_splice_read_invis(
struct file *infilp,
+ loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len,
unsigned int flags)
@@ -273,7 +275,7 @@ xfs_file_splice_read_invis(
vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode);
ssize_t rval;
- VOP_SPLICE_READ(vp, infilp, pipe, len, flags, IO_INVIS, NULL, rval);
+ VOP_SPLICE_READ(vp, infilp, ppos, pipe, len, flags, IO_INVIS, NULL, rval);
return rval;
}
@@ -281,13 +283,14 @@ STATIC ssize_t
xfs_file_splice_write(
struct pipe_inode_info *pipe,
struct file *outfilp,
+ loff_t *ppos,
size_t len,
unsigned int flags)
{
vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode);
ssize_t rval;
- VOP_SPLICE_WRITE(vp, pipe, outfilp, len, flags, 0, NULL, rval);
+ VOP_SPLICE_WRITE(vp, pipe, outfilp, ppos, len, flags, 0, NULL, rval);
return rval;
}
@@ -295,13 +298,14 @@ STATIC ssize_t
xfs_file_splice_write_invis(
struct pipe_inode_info *pipe,
struct file *outfilp,
+ loff_t *ppos,
size_t len,
unsigned int flags)
{
vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode);
ssize_t rval;
- VOP_SPLICE_WRITE(vp, pipe, outfilp, len, flags, IO_INVIS, NULL, rval);
+ VOP_SPLICE_WRITE(vp, pipe, outfilp, ppos, len, flags, IO_INVIS, NULL, rval);
return rval;
}