diff options
author | Juan Quintela <quintela@redhat.com> | 2021-11-18 15:57:44 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2021-12-15 10:31:42 +0100 |
commit | f13f22badc6767ea160bb77ee09830d44107b36b (patch) | |
tree | a6cfdf5f597aa4d987574d58394d479977f843f5 /dump | |
parent | bad452a77e017dca97200e94f661e7a563dc6426 (diff) |
dump: Remove is_zero_page()
It just calls buffer_is_zero(). Just change the callers.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'dump')
-rw-r--r-- | dump/dump.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/dump/dump.c b/dump/dump.c index 662d0a62cd..a84d8b1598 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1293,14 +1293,6 @@ static size_t get_len_buf_out(size_t page_size, uint32_t flag_compress) return 0; } -/* - * check if the page is all 0 - */ -static inline bool is_zero_page(const uint8_t *buf, size_t page_size) -{ - return buffer_is_zero(buf, page_size); -} - static void write_dump_pages(DumpState *s, Error **errp) { int ret = 0; @@ -1357,7 +1349,7 @@ static void write_dump_pages(DumpState *s, Error **errp) */ while (get_next_page(&block_iter, &pfn_iter, &buf, s)) { /* check zero page */ - if (is_zero_page(buf, s->dump_info.page_size)) { + if (buffer_is_zero(buf, s->dump_info.page_size)) { ret = write_cache(&page_desc, &pd_zero, sizeof(PageDescriptor), false); if (ret < 0) { |