From: Gunnar Beutner Date: Wed, 12 Oct 2011 10:49:18 +0000 (+0200) Subject: vn_rdwr() didn't properly advance the file position X-Git-Tag: spl-0.6.0-rc7~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3989ed3223363330af014062caeeb1afbd0503f;p=spl 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 --- 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);