Fix stack frame size: spa_livelist_delete_cb()

Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Closes #10879
This commit is contained in:
Pavel Snajdr 2020-09-03 17:38:16 +02:00 committed by Brian Behlendorf
parent 7bc2d04398
commit 083ddb7714

View File

@ -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(dsl_get_next_livelist_obj(mos, zap_obj, &ll_obj));
VERIFY0(zap_count(mos, ll_obj, &count)); VERIFY0(zap_count(mos, ll_obj, &count));
if (count > 0) { if (count > 0) {
dsl_deadlist_t ll = { 0 }; dsl_deadlist_t *ll;
dsl_deadlist_entry_t *dle; dsl_deadlist_entry_t *dle;
bplist_t to_free; bplist_t to_free;
dsl_deadlist_open(&ll, mos, ll_obj); ll = kmem_zalloc(sizeof (dsl_deadlist_t), KM_SLEEP);
dle = dsl_deadlist_first(&ll); dsl_deadlist_open(ll, mos, ll_obj);
dle = dsl_deadlist_first(ll);
ASSERT3P(dle, !=, NULL); ASSERT3P(dle, !=, NULL);
bplist_create(&to_free); bplist_create(&to_free);
int err = dsl_process_sub_livelist(&dle->dle_bpobj, &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) { if (err == 0) {
sublist_delete_arg_t sync_arg = { sublist_delete_arg_t sync_arg = {
.spa = spa, .spa = spa,
.ll = &ll, .ll = ll,
.key = dle->dle_mintxg, .key = dle->dle_mintxg,
.to_free = &to_free .to_free = &to_free
}; };
@ -2524,7 +2525,8 @@ spa_livelist_delete_cb(void *arg, zthr_t *z)
} }
bplist_clear(&to_free); bplist_clear(&to_free);
bplist_destroy(&to_free); bplist_destroy(&to_free);
dsl_deadlist_close(&ll); dsl_deadlist_close(ll);
kmem_free(ll, sizeof (dsl_deadlist_t));
} else { } else {
livelist_delete_arg_t sync_arg = { livelist_delete_arg_t sync_arg = {
.spa = spa, .spa = spa,