mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
xfs: cleanup log unmount handling
Kill the current xfs_log_unmount wrapper and opencode the two function calls in the only caller. Rename the current xfs_log_unmount_dealloc to xfs_log_unmount as it undoes xfs_log_mount and the new name makes that more clear. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
parent
da5309cd28
commit
21b699c895
3 changed files with 5 additions and 18 deletions
|
@ -634,19 +634,6 @@ xfs_log_mount_finish(xfs_mount_t *mp)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Unmount processing for the log.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
xfs_log_unmount(xfs_mount_t *mp)
|
|
||||||
{
|
|
||||||
int error;
|
|
||||||
|
|
||||||
error = xfs_log_unmount_write(mp);
|
|
||||||
xfs_log_unmount_dealloc(mp);
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Final log writes as part of unmount.
|
* Final log writes as part of unmount.
|
||||||
*
|
*
|
||||||
|
@ -797,7 +784,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
|
||||||
* and deallocate the log as the aild references the log.
|
* and deallocate the log as the aild references the log.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xfs_log_unmount_dealloc(xfs_mount_t *mp)
|
xfs_log_unmount(xfs_mount_t *mp)
|
||||||
{
|
{
|
||||||
xfs_trans_ail_destroy(mp);
|
xfs_trans_ail_destroy(mp);
|
||||||
xlog_dealloc_log(mp->m_log);
|
xlog_dealloc_log(mp->m_log);
|
||||||
|
|
|
@ -170,9 +170,8 @@ int xfs_log_write(struct xfs_mount *mp,
|
||||||
int nentries,
|
int nentries,
|
||||||
xfs_log_ticket_t ticket,
|
xfs_log_ticket_t ticket,
|
||||||
xfs_lsn_t *start_lsn);
|
xfs_lsn_t *start_lsn);
|
||||||
int xfs_log_unmount(struct xfs_mount *mp);
|
|
||||||
int xfs_log_unmount_write(struct xfs_mount *mp);
|
int xfs_log_unmount_write(struct xfs_mount *mp);
|
||||||
void xfs_log_unmount_dealloc(struct xfs_mount *mp);
|
void xfs_log_unmount(struct xfs_mount *mp);
|
||||||
int xfs_log_force_umount(struct xfs_mount *mp, int logerror);
|
int xfs_log_force_umount(struct xfs_mount *mp, int logerror);
|
||||||
int xfs_log_need_covered(struct xfs_mount *mp);
|
int xfs_log_need_covered(struct xfs_mount *mp);
|
||||||
|
|
||||||
|
|
|
@ -1194,7 +1194,7 @@ xfs_mountfs(
|
||||||
out_rele_rip:
|
out_rele_rip:
|
||||||
IRELE(rip);
|
IRELE(rip);
|
||||||
out_log_dealloc:
|
out_log_dealloc:
|
||||||
xfs_log_unmount_dealloc(mp);
|
xfs_log_unmount(mp);
|
||||||
out_free_perag:
|
out_free_perag:
|
||||||
xfs_free_perag(mp);
|
xfs_free_perag(mp);
|
||||||
out_remove_uuid:
|
out_remove_uuid:
|
||||||
|
@ -1280,7 +1280,8 @@ xfs_unmountfs(
|
||||||
"Freespace may not be correct on next mount.");
|
"Freespace may not be correct on next mount.");
|
||||||
xfs_unmountfs_writesb(mp);
|
xfs_unmountfs_writesb(mp);
|
||||||
xfs_unmountfs_wait(mp); /* wait for async bufs */
|
xfs_unmountfs_wait(mp); /* wait for async bufs */
|
||||||
xfs_log_unmount(mp); /* Done! No more fs ops. */
|
xfs_log_unmount_write(mp);
|
||||||
|
xfs_log_unmount(mp);
|
||||||
|
|
||||||
if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0)
|
if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0)
|
||||||
uuid_table_remove(&mp->m_sb.sb_uuid);
|
uuid_table_remove(&mp->m_sb.sb_uuid);
|
||||||
|
|
Loading…
Reference in a new issue