zil_fail: fix infinite loop in commit itx search
(cherry picked from commit ba1f888858f8599e10211aa9957d942e7bcc36ce)
This commit is contained in:
parent
6c36d72e71
commit
3cb140863f
|
@ -1251,13 +1251,16 @@ zil_fail(zilog_t *zilog)
|
||||||
* how they can legitimately end up here.
|
* how they can legitimately end up here.
|
||||||
*/
|
*/
|
||||||
l = &itxg->itxg_itxs->i_sync_list;
|
l = &itxg->itxg_itxs->i_sync_list;
|
||||||
while ((itx = list_head(l)) != NULL) {
|
itx = list_head(l);
|
||||||
|
while (itx != NULL) {
|
||||||
|
itx_t *nitx = list_next(l, itx);
|
||||||
if (itx->itx_lr.lrc_txtype == TX_COMMIT) {
|
if (itx->itx_lr.lrc_txtype == TX_COMMIT) {
|
||||||
list_remove(l, itx);
|
list_remove(l, itx);
|
||||||
list_insert_tail(&waiters, itx->itx_private);
|
list_insert_tail(&waiters, itx->itx_private);
|
||||||
itx->itx_private = NULL;
|
itx->itx_private = NULL;
|
||||||
zil_itx_destroy(itx);
|
zil_itx_destroy(itx);
|
||||||
}
|
}
|
||||||
|
itx = nitx;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_exit(&itxg->itxg_lock);
|
mutex_exit(&itxg->itxg_lock);
|
||||||
|
|
Loading…
Reference in New Issue