diff options
author | Christoph Hellwig <hch@lst.de> | 2020-03-25 18:18:23 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-27 08:32:53 -0700 |
commit | 8b41e3f98e6ca17ed54615bb7a419c499d370a85 (patch) | |
tree | f2499a4aa94b5df70476144fc797c4ae4ed06891 /fs/xfs/xfs_log_cil.c | |
parent | 70e42f2d4797d4d3f09bc0f6df57e8b8c5597e27 (diff) | |
download | linux-8b41e3f98e6ca17ed54615bb7a419c499d370a85.tar.bz2 |
xfs: split xlog_ticket_done
Remove xlog_ticket_done and just call the renamed low-level helpers for
ungranting or regranting log space directly. To make that a little
the reference put on the ticket and all tracing is moved into the actual
helpers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_log_cil.c')
-rw-r--r-- | fs/xfs/xfs_log_cil.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index 666041ef058f..0ae187fa9af2 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c @@ -843,7 +843,7 @@ restart: if (error) goto out_abort_free_ticket; - xlog_ticket_done(log, tic, false); + xfs_log_ticket_ungrant(log, tic); spin_lock(&commit_iclog->ic_callback_lock); if (commit_iclog->ic_state == XLOG_STATE_IOERROR) { @@ -876,7 +876,7 @@ out_skip: return; out_abort_free_ticket: - xlog_ticket_done(log, tic, false); + xfs_log_ticket_ungrant(log, tic); out_abort: ASSERT(XLOG_FORCED_SHUTDOWN(log)); xlog_cil_committed(ctx); @@ -1008,7 +1008,10 @@ xfs_log_commit_cil( if (commit_lsn) *commit_lsn = xc_commit_lsn; - xlog_ticket_done(log, tp->t_ticket, regrant); + if (regrant && !XLOG_FORCED_SHUTDOWN(log)) + xfs_log_ticket_regrant(log, tp->t_ticket); + else + xfs_log_ticket_ungrant(log, tp->t_ticket); tp->t_ticket = NULL; xfs_trans_unreserve_and_mod_sb(tp); |