aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-02-21 15:24:37 -0500
committerBrian Behlendorf <[email protected]>2018-02-21 12:24:37 -0800
commit478b3150dea216d73e3d65749c8d6ccd365efef4 (patch)
tree8da23985d156059843eb2f8fafb4c460e9def6ec /module
parentf2c0dee23b65fb2581a0257bdaaecf892ca800c1 (diff)
Add omitted set for os->os_next_write_raw
This one line patch adds adds a set to os->os_next_write_raw that was omitted when the code was updated in 1b66810. Without it, the code (in some instances) could attempt to write raw encrypted data as regular unencrypted data without the keys being loaded, triggering an ASSERT in zio_encrypt(). Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7196
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dmu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
index cb86800f4..b7c5bba15 100644
--- a/module/zfs/dmu.c
+++ b/module/zfs/dmu.c
@@ -847,8 +847,11 @@ dmu_free_long_range_impl(objset_t *os, dnode_t *dn, uint64_t offset,
while (dr != NULL && dr->dr_txg > tx->tx_txg)
dr = dr->dr_next;
- if (dr != NULL && dr->dr_txg == tx->tx_txg)
+ if (dr != NULL && dr->dr_txg == tx->tx_txg) {
dr->dt.dl.dr_raw = B_TRUE;
+ dn->dn_objset->os_next_write_raw
+ [tx->tx_txg & TXG_MASK] = B_TRUE;
+ }
}
dmu_tx_commit(tx);