aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r--fs/xfs/xfs_trans.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index b22a09e9daee..bcc978011869 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -436,7 +436,6 @@ xfs_trans_mod_sb(
tp->t_res_frextents_delta += delta;
break;
case XFS_TRANS_SB_DBLOCKS:
- ASSERT(delta > 0);
tp->t_dblocks_delta += delta;
break;
case XFS_TRANS_SB_AGCOUNT:
@@ -618,19 +617,12 @@ xfs_trans_unreserve_and_mod_sb(
ASSERT(!error);
}
- if (idelta) {
+ if (idelta)
percpu_counter_add_batch(&mp->m_icount, idelta,
XFS_ICOUNT_BATCH);
- if (idelta < 0)
- ASSERT(__percpu_counter_compare(&mp->m_icount, 0,
- XFS_ICOUNT_BATCH) >= 0);
- }
- if (ifreedelta) {
+ if (ifreedelta)
percpu_counter_add(&mp->m_ifree, ifreedelta);
- if (ifreedelta < 0)
- ASSERT(percpu_counter_compare(&mp->m_ifree, 0) >= 0);
- }
if (rtxdelta == 0 && !(tp->t_flags & XFS_TRANS_SB_DIRTY))
return;
@@ -1197,7 +1189,7 @@ retry:
* though that part is only semi-transactional.
*/
error = xfs_trans_reserve_quota_bydquots(tp, mp, udqp, gdqp,
- pdqp, ip->i_d.di_nblocks + ip->i_delayed_blks,
+ pdqp, ip->i_nblocks + ip->i_delayed_blks,
1, qflags);
if ((error == -EDQUOT || error == -ENOSPC) && !retried) {
xfs_trans_cancel(tp);