From f3989ed3223363330af014062caeeb1afbd0503f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 12 Oct 2011 12:49:18 +0200 Subject: [PATCH] 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 Closes ZFS issue #391 --- module/spl/spl-vnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 1b5cc5a..354e879 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); -- 2.39.5