Skip to content

Commit

Permalink
Restore the zfs_dirty_inode
Browse files Browse the repository at this point in the history
Signed-off-by: Grady Wong <grady.w@xtaotech.com>
  • Loading branch information
wgqimut committed Oct 15, 2018
1 parent 102619e commit cfce4c2
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions module/zfs/zfs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cfce4c2

Please sign in to comment.