diff options
-rw-r--r-- | src/kernel/xloop_file_fmt_qcow_main.c | 4 | ||||
-rw-r--r-- | src/kernel/xloop_main.c | 2 | ||||
-rw-r--r-- | src/kernel/xloop_main.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/xloop_file_fmt_qcow_main.c b/src/kernel/xloop_file_fmt_qcow_main.c index d80a074..8eb7b52 100644 --- a/src/kernel/xloop_file_fmt_qcow_main.c +++ b/src/kernel/xloop_file_fmt_qcow_main.c @@ -682,6 +682,7 @@ static int qcow_file_fmt_init(struct xloop_file_fmt *xlo_fmt) if (qcow_data->l1_size > 0) { const int read_size = qcow_data->l1_size * QCOW_L1E_SIZE; + qcow_data->l1_table = vzalloc(round_up(qcow_data->l1_size * QCOW_L1E_SIZE, 512)); if (qcow_data->l1_table == NULL) { ret = -ENOMEM; @@ -920,7 +921,8 @@ static ssize_t __qcow_file_fmt_zstd_decompress(struct xloop_file_fmt *xlo_fmt, v if (zstd_is_error(zstd_ret)) { dev_err(xloop_file_fmt_to_dev(xlo_fmt), "zstd decompress error: %d\n", (int)zstd_ret); ret = -EIO; - } if (zstd_ret) { + } + if (zstd_ret) { dev_err(xloop_file_fmt_to_dev(xlo_fmt), "zstd incomplete frame at end of cluster\n"); ret = -EIO; } else { diff --git a/src/kernel/xloop_main.c b/src/kernel/xloop_main.c index cd1a767..9a9479f 100644 --- a/src/kernel/xloop_main.c +++ b/src/kernel/xloop_main.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include "xloop_main.h" diff --git a/src/kernel/xloop_main.h b/src/kernel/xloop_main.h index 3649039..a71f776 100644 --- a/src/kernel/xloop_main.h +++ b/src/kernel/xloop_main.h @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + #include <linux/version.h> /* define RHEL_CHECK_VERSION macro to check CentOS version */ |