| 400 | } |
| 401 | |
| 402 | void |
| 403 | zio_pop_transforms(zio_t *zio) |
| 404 | { |
| 405 | zio_transform_t *zt; |
| 406 | |
| 407 | while ((zt = zio->io_transform_stack) != NULL) { |
| 408 | if (zt->zt_transform != NULL) |
| 409 | zt->zt_transform(zio, |
| 410 | zt->zt_orig_abd, zt->zt_orig_size); |
| 411 | |
| 412 | if (zt->zt_bufsize != 0) |
| 413 | abd_free(zio->io_abd); |
| 414 | |
| 415 | zio->io_abd = zt->zt_orig_abd; |
| 416 | zio->io_size = zt->zt_orig_size; |
| 417 | zio->io_transform_stack = zt->zt_next; |
| 418 | |
| 419 | kmem_free(zt, sizeof (zio_transform_t)); |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | /* |
| 424 | * ========================================================================== |
no test coverage detected