summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGunnar Beutner <[email protected]>2011-10-12 12:49:18 +0200
committerBrian Behlendorf <[email protected]>2011-10-18 16:51:35 -0700
commitf3989ed3223363330af014062caeeb1afbd0503f (patch)
tree86f93e0e7a1d297fd0b24e637ff5d9bde7c1f967 /module
parenta49bc996897fb0f4c38ea6d3bbeafbe27dc82e72 (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
Diffstat (limited to 'module')
-rw-r--r--module/spl/spl-vnode.c1
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);