| 2013 | } |
| 2014 | |
| 2015 | noinline static int |
| 2016 | flush_write_batch(struct receive_writer_arg *rwa) |
| 2017 | { |
| 2018 | if (list_is_empty(&rwa->write_batch)) |
| 2019 | return (0); |
| 2020 | int err = rwa->err; |
| 2021 | if (err == 0) |
| 2022 | err = flush_write_batch_impl(rwa); |
| 2023 | if (err != 0) { |
| 2024 | struct receive_record_arg *rrd; |
| 2025 | while ((rrd = list_remove_head(&rwa->write_batch)) != NULL) { |
| 2026 | abd_free(rrd->abd); |
| 2027 | kmem_free(rrd, sizeof (*rrd)); |
| 2028 | } |
| 2029 | } |
| 2030 | ASSERT(list_is_empty(&rwa->write_batch)); |
| 2031 | return (err); |
| 2032 | } |
| 2033 | |
| 2034 | noinline static int |
| 2035 | receive_process_write_record(struct receive_writer_arg *rwa, |
no test coverage detected