diff options
author | David Chinner <david@fromorbit.com> | 2008-10-30 02:39:23 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 02:39:23 -0400 |
commit | c7e8f268278a292d3823b4352182fa7755a71410 (patch) | |
tree | f7316f830fdc7feedfd9ae486ac097e8f5df8dad /fs/xfs/xfs_log_recover.c | |
parent | 7b2e2a31f5c23b5f028af8c895137b4c512cc1c8 (diff) |
[XFS] Move the AIL lock into the struct xfs_ail
Bring the ail lock inside the struct xfs_ail. This means the AIL can be
entirely manipulated via the struct xfs_ail rather than needing both the
struct xfs_mount and the struct xfs_ail.
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32350a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 45ea0d950138..a484febb9ec6 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -2681,7 +2681,7 @@ xlog_recover_do_efi_trans( | |||
2681 | efip->efi_next_extent = efi_formatp->efi_nextents; | 2681 | efip->efi_next_extent = efi_formatp->efi_nextents; |
2682 | efip->efi_flags |= XFS_EFI_COMMITTED; | 2682 | efip->efi_flags |= XFS_EFI_COMMITTED; |
2683 | 2683 | ||
2684 | spin_lock(&mp->m_ail_lock); | 2684 | spin_lock(&mp->m_ail->xa_lock); |
2685 | /* | 2685 | /* |
2686 | * xfs_trans_update_ail() drops the AIL lock. | 2686 | * xfs_trans_update_ail() drops the AIL lock. |
2687 | */ | 2687 | */ |
@@ -2727,7 +2727,7 @@ xlog_recover_do_efd_trans( | |||
2727 | * in the AIL. | 2727 | * in the AIL. |
2728 | */ | 2728 | */ |
2729 | mp = log->l_mp; | 2729 | mp = log->l_mp; |
2730 | spin_lock(&mp->m_ail_lock); | 2730 | spin_lock(&mp->m_ail->xa_lock); |
2731 | lip = xfs_trans_ail_cursor_first(mp->m_ail, &cur, 0); | 2731 | lip = xfs_trans_ail_cursor_first(mp->m_ail, &cur, 0); |
2732 | while (lip != NULL) { | 2732 | while (lip != NULL) { |
2733 | if (lip->li_type == XFS_LI_EFI) { | 2733 | if (lip->li_type == XFS_LI_EFI) { |
@@ -2739,14 +2739,14 @@ xlog_recover_do_efd_trans( | |||
2739 | */ | 2739 | */ |
2740 | xfs_trans_delete_ail(mp, lip); | 2740 | xfs_trans_delete_ail(mp, lip); |
2741 | xfs_efi_item_free(efip); | 2741 | xfs_efi_item_free(efip); |
2742 | spin_lock(&mp->m_ail_lock); | 2742 | spin_lock(&mp->m_ail->xa_lock); |
2743 | break; | 2743 | break; |
2744 | } | 2744 | } |
2745 | } | 2745 | } |
2746 | lip = xfs_trans_ail_cursor_next(mp->m_ail, &cur); | 2746 | lip = xfs_trans_ail_cursor_next(mp->m_ail, &cur); |
2747 | } | 2747 | } |
2748 | xfs_trans_ail_cursor_done(mp->m_ail, &cur); | 2748 | xfs_trans_ail_cursor_done(mp->m_ail, &cur); |
2749 | spin_unlock(&mp->m_ail_lock); | 2749 | spin_unlock(&mp->m_ail->xa_lock); |
2750 | } | 2750 | } |
2751 | 2751 | ||
2752 | /* | 2752 | /* |
@@ -3058,7 +3058,7 @@ xlog_recover_process_efis( | |||
3058 | struct xfs_ail_cursor cur; | 3058 | struct xfs_ail_cursor cur; |
3059 | 3059 | ||
3060 | mp = log->l_mp; | 3060 | mp = log->l_mp; |
3061 | spin_lock(&mp->m_ail_lock); | 3061 | spin_lock(&mp->m_ail->xa_lock); |
3062 | 3062 | ||
3063 | lip = xfs_trans_ail_cursor_first(mp->m_ail, &cur, 0); | 3063 | lip = xfs_trans_ail_cursor_first(mp->m_ail, &cur, 0); |
3064 | while (lip != NULL) { | 3064 | while (lip != NULL) { |
@@ -3084,16 +3084,16 @@ xlog_recover_process_efis( | |||
3084 | continue; | 3084 | continue; |
3085 | } | 3085 | } |
3086 | 3086 | ||
3087 | spin_unlock(&mp->m_ail_lock); | 3087 | spin_unlock(&mp->m_ail->xa_lock); |
3088 | error = xlog_recover_process_efi(mp, efip); | 3088 | error = xlog_recover_process_efi(mp, efip); |
3089 | spin_lock(&mp->m_ail_lock); | 3089 | spin_lock(&mp->m_ail->xa_lock); |
3090 | if (error) | 3090 | if (error) |
3091 | goto out; | 3091 | goto out; |
3092 | lip = xfs_trans_ail_cursor_next(mp->m_ail, &cur); | 3092 | lip = xfs_trans_ail_cursor_next(mp->m_ail, &cur); |
3093 | } | 3093 | } |
3094 | out: | 3094 | out: |
3095 | xfs_trans_ail_cursor_done(mp->m_ail, &cur); | 3095 | xfs_trans_ail_cursor_done(mp->m_ail, &cur); |
3096 | spin_unlock(&mp->m_ail_lock); | 3096 | spin_unlock(&mp->m_ail->xa_lock); |
3097 | return error; | 3097 | return error; |
3098 | } | 3098 | } |
3099 | 3099 | ||