aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorPavel Snajdr <[email protected]>2020-09-03 17:38:16 +0200
committerBrian Behlendorf <[email protected]>2020-09-15 15:55:03 -0700
commitc95625769db24df81806d8f41bbd34b1da36a5ca (patch)
treefe676b1d48c8ad19da81431025eaa21162b31e87 /module
parent5797d7cc4c80e279002b1511fe4d7151e955e59d (diff)
Fix stack frame size: spa_livelist_delete_cb()
Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Snajdr <[email protected]> Closes #10879
Diffstat (limited to 'module')
-rw-r--r--module/zfs/spa.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 0bf0e366a..8c662f6b0 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -2497,11 +2497,12 @@ spa_livelist_delete_cb(void *arg, zthr_t *z)
VERIFY0(dsl_get_next_livelist_obj(mos, zap_obj, &ll_obj));
VERIFY0(zap_count(mos, ll_obj, &count));
if (count > 0) {
- dsl_deadlist_t ll = { 0 };
+ dsl_deadlist_t *ll;
dsl_deadlist_entry_t *dle;
bplist_t to_free;
- dsl_deadlist_open(&ll, mos, ll_obj);
- dle = dsl_deadlist_first(&ll);
+ ll = kmem_zalloc(sizeof (dsl_deadlist_t), KM_SLEEP);
+ dsl_deadlist_open(ll, mos, ll_obj);
+ dle = dsl_deadlist_first(ll);
ASSERT3P(dle, !=, NULL);
bplist_create(&to_free);
int err = dsl_process_sub_livelist(&dle->dle_bpobj, &to_free,
@@ -2509,7 +2510,7 @@ spa_livelist_delete_cb(void *arg, zthr_t *z)
if (err == 0) {
sublist_delete_arg_t sync_arg = {
.spa = spa,
- .ll = &ll,
+ .ll = ll,
.key = dle->dle_mintxg,
.to_free = &to_free
};
@@ -2524,7 +2525,8 @@ spa_livelist_delete_cb(void *arg, zthr_t *z)
}
bplist_clear(&to_free);
bplist_destroy(&to_free);
- dsl_deadlist_close(&ll);
+ dsl_deadlist_close(ll);
+ kmem_free(ll, sizeof (dsl_deadlist_t));
} else {
livelist_delete_arg_t sync_arg = {
.spa = spa,