|
@@ -134,7 +134,7 @@ xfs_trans_reserve(
|
|
bool rsvd = (tp->t_flags & XFS_TRANS_RESERVE) != 0;
|
|
bool rsvd = (tp->t_flags & XFS_TRANS_RESERVE) != 0;
|
|
|
|
|
|
/* Mark this thread as being in a transaction */
|
|
/* Mark this thread as being in a transaction */
|
|
- current_set_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
|
|
|
|
|
+ current_set_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Attempt to reserve the needed disk blocks by decrementing
|
|
* Attempt to reserve the needed disk blocks by decrementing
|
|
@@ -144,7 +144,7 @@ xfs_trans_reserve(
|
|
if (blocks > 0) {
|
|
if (blocks > 0) {
|
|
error = xfs_mod_fdblocks(tp->t_mountp, -((int64_t)blocks), rsvd);
|
|
error = xfs_mod_fdblocks(tp->t_mountp, -((int64_t)blocks), rsvd);
|
|
if (error != 0) {
|
|
if (error != 0) {
|
|
- current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
|
|
|
|
|
+ current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS);
|
|
return -ENOSPC;
|
|
return -ENOSPC;
|
|
}
|
|
}
|
|
tp->t_blk_res += blocks;
|
|
tp->t_blk_res += blocks;
|
|
@@ -221,7 +221,7 @@ undo_blocks:
|
|
tp->t_blk_res = 0;
|
|
tp->t_blk_res = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
|
|
|
|
|
+ current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS);
|
|
|
|
|
|
return error;
|
|
return error;
|
|
}
|
|
}
|
|
@@ -914,7 +914,7 @@ __xfs_trans_commit(
|
|
|
|
|
|
xfs_log_commit_cil(mp, tp, &commit_lsn, regrant);
|
|
xfs_log_commit_cil(mp, tp, &commit_lsn, regrant);
|
|
|
|
|
|
- current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
|
|
|
|
|
+ current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS);
|
|
xfs_trans_free(tp);
|
|
xfs_trans_free(tp);
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -944,7 +944,7 @@ out_unreserve:
|
|
if (commit_lsn == -1 && !error)
|
|
if (commit_lsn == -1 && !error)
|
|
error = -EIO;
|
|
error = -EIO;
|
|
}
|
|
}
|
|
- current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
|
|
|
|
|
+ current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS);
|
|
xfs_trans_free_items(tp, NULLCOMMITLSN, !!error);
|
|
xfs_trans_free_items(tp, NULLCOMMITLSN, !!error);
|
|
xfs_trans_free(tp);
|
|
xfs_trans_free(tp);
|
|
|
|
|
|
@@ -998,7 +998,7 @@ xfs_trans_cancel(
|
|
xfs_log_done(mp, tp->t_ticket, NULL, false);
|
|
xfs_log_done(mp, tp->t_ticket, NULL, false);
|
|
|
|
|
|
/* mark this thread as no longer being in a transaction */
|
|
/* mark this thread as no longer being in a transaction */
|
|
- current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
|
|
|
|
|
+ current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS);
|
|
|
|
|
|
xfs_trans_free_items(tp, NULLCOMMITLSN, dirty);
|
|
xfs_trans_free_items(tp, NULLCOMMITLSN, dirty);
|
|
xfs_trans_free(tp);
|
|
xfs_trans_free(tp);
|