summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Ahrens <mahrens@delphix.com>2020-04-21 10:44:12 -0500
committerJason King <jason.king@joyent.com>2020-04-22 15:56:51 -0500
commit25df42a1dccd017663f3ad651c90038648d1d6a8 (patch)
tree3749f6521aa3cac39422d7bf756914752c0ebab5
parent82b4190e0f86654c179e1dad46c51c6f999464ec (diff)
downloadillumos-joyent-25df42a1dccd017663f3ad651c90038648d1d6a8.tar.gz
12586 zvol_write() can use dmu_tx_hold_write_by_dnode()
Reviewed by: Jorgen Lundman <lundman@lundman.net> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Tony Nguyen <tony.nguyen@delphix.com> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/fs/zfs/zvol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/zfs/zvol.c b/usr/src/uts/common/fs/zfs/zvol.c
index 00bf247327..83dbf67e98 100644
--- a/usr/src/uts/common/fs/zfs/zvol.c
+++ b/usr/src/uts/common/fs/zfs/zvol.c
@@ -24,7 +24,7 @@
* Portions Copyright 2010 Robert Milkowski
*
* Copyright 2017 Nexenta Systems, Inc. All rights reserved.
- * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2020 by Delphix. All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
* Copyright 2019 Joyent, Inc.
*/
@@ -1432,7 +1432,7 @@ zvol_write(dev_t dev, uio_t *uio, cred_t *cr)
if (bytes > volsize - off) /* don't write past the end */
bytes = volsize - off;
- dmu_tx_hold_write(tx, ZVOL_OBJ, off, bytes);
+ dmu_tx_hold_write_by_dnode(tx, zv->zv_dn, off, bytes);
error = dmu_tx_assign(tx, TXG_WAIT);
if (error) {
dmu_tx_abort(tx);