diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index a362e3b5bddf..a896ea553242 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -4654,24 +4654,13 @@ zfs_dirty_inode(struct inode *ip, int flags) } #endif -top: tx = dmu_tx_create(zfsvfs->z_os); + dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE); zfs_sa_upgrade_txholds(tx, zp); - /* - * Despite this function allows an error to be returned, it's called - * from zpl_dirty_inode() which is a Linux VFS callback functions - * (.dirty_inode) which must always succeed, so we have to assign a - * txg with TXG_NOTHROTTLE plus TX_WAIT. - */ - error = dmu_tx_assign(tx, TXG_NOTHROTTLE | TXG_WAIT); + error = dmu_tx_assign(tx, TXG_WAIT); if (error) { - if (error == ERESTART) { - dmu_tx_wait(tx); - dmu_tx_abort(tx); - goto top; - } dmu_tx_abort(tx); goto out; }