diff options
Diffstat (limited to 'sys/contrib')
-rw-r--r-- | sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 5888e06..288bf9a 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -327,6 +327,15 @@ again: va = (caddr_t)sf_buf_kva(sf); woff = uio->uio_loffset - off; error = uiomove(va + off, bytes, UIO_WRITE, uio); + /* + * The uiomove() above could have been partially + * successful, that's why we call dmu_write() + * below unconditionally. The page was marked + * non-dirty above and we would lose the changes + * without doing so. If the uiomove() failed + * entirely, well, we just write what we got + * before one more time. + */ dmu_write(os, zp->z_id, woff, MIN(PAGESIZE, fsize - woff), va, tx); sf_buf_free(sf); |