diff options
author | Gunnar Beutner <[email protected]> | 2011-10-12 12:49:18 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-10-18 16:51:35 -0700 |
commit | f3989ed3223363330af014062caeeb1afbd0503f (patch) | |
tree | 86f93e0e7a1d297fd0b24e637ff5d9bde7c1f967 | |
parent | a49bc996897fb0f4c38ea6d3bbeafbe27dc82e72 (diff) |
vn_rdwr() didn't properly advance the file position
This would cause problems when using 'zfs send' with a file as the
target (rather than a pipe or a socket as is usually the case) as
for each write the destination offset in the file would be 0.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes ZFS issue #391
-rw-r--r-- | module/spl/spl-vnode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 1b5cc5a08..354e8798b 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -247,6 +247,7 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, rc = vfs_read(fp, addr, len, &offset); set_fs(saved_fs); + fp->f_pos = offset; if (rc < 0) SRETURN(-rc); |