diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_log_cil.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index 9dc8125d04e5..c7eac5acbfea 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c | |||
@@ -543,7 +543,7 @@ xlog_cil_push( | |||
543 | 543 | ||
544 | error = xlog_write(log, &lvhdr, tic, &ctx->start_lsn, NULL, 0); | 544 | error = xlog_write(log, &lvhdr, tic, &ctx->start_lsn, NULL, 0); |
545 | if (error) | 545 | if (error) |
546 | goto out_abort; | 546 | goto out_abort_free_ticket; |
547 | 547 | ||
548 | /* | 548 | /* |
549 | * now that we've written the checkpoint into the log, strictly | 549 | * now that we've written the checkpoint into the log, strictly |
@@ -569,8 +569,9 @@ restart: | |||
569 | } | 569 | } |
570 | spin_unlock(&cil->xc_cil_lock); | 570 | spin_unlock(&cil->xc_cil_lock); |
571 | 571 | ||
572 | /* xfs_log_done always frees the ticket on error. */ | ||
572 | commit_lsn = xfs_log_done(log->l_mp, tic, &commit_iclog, 0); | 573 | commit_lsn = xfs_log_done(log->l_mp, tic, &commit_iclog, 0); |
573 | if (error || commit_lsn == -1) | 574 | if (commit_lsn == -1) |
574 | goto out_abort; | 575 | goto out_abort; |
575 | 576 | ||
576 | /* attach all the transactions w/ busy extents to iclog */ | 577 | /* attach all the transactions w/ busy extents to iclog */ |
@@ -600,6 +601,8 @@ out_free_ticket: | |||
600 | kmem_free(new_ctx); | 601 | kmem_free(new_ctx); |
601 | return 0; | 602 | return 0; |
602 | 603 | ||
604 | out_abort_free_ticket: | ||
605 | xfs_log_ticket_put(tic); | ||
603 | out_abort: | 606 | out_abort: |
604 | xlog_cil_committed(ctx, XFS_LI_ABORTED); | 607 | xlog_cil_committed(ctx, XFS_LI_ABORTED); |
605 | return XFS_ERROR(EIO); | 608 | return XFS_ERROR(EIO); |