Skip to content

Commit b077fd4

Browse files
Christopher Sidenbehlendorf
authored andcommitted
Illumos #3189 kernel panic in test hotspare_onoffline_004_neg
3189 kernel panic in ZFS test suite during hotspare_onoffline_004_neg Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Arne Jansen <sensille@gmx.net> Approved by: Dan McDonald <danmcd@nexenta.com> References: illumos/illumos-gate@8f0b538 changeset: 13818:e9ad0a945d45 https://www.illumos.org/issues/3189 Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
1 parent ff80d9b commit b077fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/zfs/dmu_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
589589
(dn->dn_indblkshift - SPA_BLKPTRSHIFT);
590590

591591
while (level++ < maxlevel) {
592-
txh->txh_memory_tohold += MIN(blkcnt, (nl1blks >> epbs))
592+
txh->txh_memory_tohold += MAX(MIN(blkcnt, nl1blks), 1)
593593
<< dn->dn_indblkshift;
594594
blkcnt = 1 + (blkcnt >> epbs);
595595
}

0 commit comments

Comments
 (0)