summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorChristopher Siden <chris.siden@delphix.com>2013-01-14 10:29:55 -0800
committerBrian Behlendorf <behlendorf1@llnl.gov>2013-01-14 10:34:53 -0800
commitb077fd4c4e16d372ef81035199e132687dbcf0e3 (patch)
tree61c01c3426d5d215c7af2a24f18e6002cea919c5 /module/zfs
parentff80d9b142826c15fa84e3c4b9ef1795fd6e9485 (diff)
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@8f0b538d1dc99df23a6a89cfd9ffddc1b9804a00 changeset: 13818:e9ad0a945d45 https://www.illumos.org/issues/3189 Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/dmu_tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c
index 044349c34..e47d858dd 100644
--- a/module/zfs/dmu_tx.c
+++ b/module/zfs/dmu_tx.c
@@ -589,7 +589,7 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
(dn->dn_indblkshift - SPA_BLKPTRSHIFT);
while (level++ < maxlevel) {
- txh->txh_memory_tohold += MIN(blkcnt, (nl1blks >> epbs))
+ txh->txh_memory_tohold += MAX(MIN(blkcnt, nl1blks), 1)
<< dn->dn_indblkshift;
blkcnt = 1 + (blkcnt >> epbs);
}