xfs: update and factor xfs_trans_committed()