From 25df42a1dccd017663f3ad651c90038648d1d6a8 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Tue, 21 Apr 2020 10:44:12 -0500 Subject: 12586 zvol_write() can use dmu_tx_hold_write_by_dnode() Reviewed by: Jorgen Lundman Reviewed by: Brian Behlendorf Reviewed by: Tony Nguyen Reviewed by: Andrew Stormont Approved by: Dan McDonald --- usr/src/uts/common/fs/zfs/zvol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/src/uts/common/fs/zfs/zvol.c') 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); -- cgit v1.2.3