xfs: saner xfs_trans_commit interface
The flags argument to xfs_trans_commit is not useful for most callers, as a commit of a transaction without a permanent log reservation must pass 0 here, and all callers for a transaction with a permanent log reservation except for xfs_trans_roll must pass XFS_TRANS_RELEASE_LOG_RES. So remove the flags argument from the public xfs_trans_commit interfaces, and introduce low-level __xfs_trans_commit variant just for xfs_trans_roll that regrants a log reservation instead of releasing it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:

committed by
Dave Chinner

parent
4906e21545
commit
70393313dd
@@ -3751,7 +3751,7 @@ xlog_recover_process_efi(
|
||||
}
|
||||
|
||||
set_bit(XFS_EFI_RECOVERED, &efip->efi_flags);
|
||||
error = xfs_trans_commit(tp, 0);
|
||||
error = xfs_trans_commit(tp);
|
||||
return error;
|
||||
|
||||
abort_error:
|
||||
@@ -3857,7 +3857,7 @@ xlog_recover_clear_agi_bucket(
|
||||
xfs_trans_log_buf(tp, agibp, offset,
|
||||
(offset + sizeof(xfs_agino_t) - 1));
|
||||
|
||||
error = xfs_trans_commit(tp, 0);
|
||||
error = xfs_trans_commit(tp);
|
||||
if (error)
|
||||
goto out_error;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user