aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_log_recover.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 418582b709eb..3a8fe7bfa2af 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3003,15 +3003,15 @@ xlog_recover_process_efi(
3003 3003
3004 tp = xfs_trans_alloc(mp, 0); 3004 tp = xfs_trans_alloc(mp, 0);
3005 error = xfs_trans_reserve(tp, 0, XFS_ITRUNCATE_LOG_RES(mp), 0, 0, 0); 3005 error = xfs_trans_reserve(tp, 0, XFS_ITRUNCATE_LOG_RES(mp), 0, 0, 0);
3006 if (error) { 3006 if (error)
3007 xfs_trans_cancel(tp, XFS_TRANS_ABORT); 3007 goto abort_error;
3008 return error;
3009 }
3010 efdp = xfs_trans_get_efd(tp, efip, efip->efi_format.efi_nextents); 3008 efdp = xfs_trans_get_efd(tp, efip, efip->efi_format.efi_nextents);
3011 3009
3012 for (i = 0; i < efip->efi_format.efi_nextents; i++) { 3010 for (i = 0; i < efip->efi_format.efi_nextents; i++) {
3013 extp = &(efip->efi_format.efi_extents[i]); 3011 extp = &(efip->efi_format.efi_extents[i]);
3014 xfs_free_extent(tp, extp->ext_start, extp->ext_len); 3012 error = xfs_free_extent(tp, extp->ext_start, extp->ext_len);
3013 if (error)
3014 goto abort_error;
3015 xfs_trans_log_efd_extent(tp, efdp, extp->ext_start, 3015 xfs_trans_log_efd_extent(tp, efdp, extp->ext_start,
3016 extp->ext_len); 3016 extp->ext_len);
3017 } 3017 }
@@ -3019,6 +3019,10 @@ xlog_recover_process_efi(
3019 efip->efi_flags |= XFS_EFI_RECOVERED; 3019 efip->efi_flags |= XFS_EFI_RECOVERED;
3020 error = xfs_trans_commit(tp, 0); 3020 error = xfs_trans_commit(tp, 0);
3021 return error; 3021 return error;
3022
3023abort_error:
3024 xfs_trans_cancel(tp, XFS_TRANS_ABORT);
3025 return error;
3022} 3026}
3023 3027
3024/* 3028/*