diff --git a/module/zfs/dmu_recv.c b/module/zfs/dmu_recv.c index 2a10b81433ac..ca873e9a0972 100644 --- a/module/zfs/dmu_recv.c +++ b/module/zfs/dmu_recv.c @@ -2700,7 +2700,8 @@ receive_writer_thread(void *arg) * free it. */ if (err != EAGAIN) { - rwa->err = err; + if (rwa->err == 0) + rwa->err = err; kmem_free(rrd, sizeof (*rrd)); } }