diff options
author | Donald Douwsma <donaldd@sgi.com> | 2007-10-11 03:36:05 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 00:44:23 -0500 |
commit | 287f3dad14828275d2517c8696ad118c82b9243f (patch) | |
tree | 4868d40f6c49984ff84f2957d84a3de160d46d7a /fs/xfs/xfs_log_recover.c | |
parent | 541d7d3c4b31e2b0ac846fe6d2eb5cdbe1353095 (diff) |
[XFS] Unwrap AIL_LOCK
SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29739a
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 851eca8a7150..4c39dc0e6841 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -2660,7 +2660,6 @@ xlog_recover_do_efi_trans( | |||
2660 | xfs_mount_t *mp; | 2660 | xfs_mount_t *mp; |
2661 | xfs_efi_log_item_t *efip; | 2661 | xfs_efi_log_item_t *efip; |
2662 | xfs_efi_log_format_t *efi_formatp; | 2662 | xfs_efi_log_format_t *efi_formatp; |
2663 | SPLDECL(s); | ||
2664 | 2663 | ||
2665 | if (pass == XLOG_RECOVER_PASS1) { | 2664 | if (pass == XLOG_RECOVER_PASS1) { |
2666 | return 0; | 2665 | return 0; |
@@ -2678,11 +2677,11 @@ xlog_recover_do_efi_trans( | |||
2678 | efip->efi_next_extent = efi_formatp->efi_nextents; | 2677 | efip->efi_next_extent = efi_formatp->efi_nextents; |
2679 | efip->efi_flags |= XFS_EFI_COMMITTED; | 2678 | efip->efi_flags |= XFS_EFI_COMMITTED; |
2680 | 2679 | ||
2681 | AIL_LOCK(mp,s); | 2680 | spin_lock(&mp->m_ail_lock); |
2682 | /* | 2681 | /* |
2683 | * xfs_trans_update_ail() drops the AIL lock. | 2682 | * xfs_trans_update_ail() drops the AIL lock. |
2684 | */ | 2683 | */ |
2685 | xfs_trans_update_ail(mp, (xfs_log_item_t *)efip, lsn, s); | 2684 | xfs_trans_update_ail(mp, (xfs_log_item_t *)efip, lsn); |
2686 | return 0; | 2685 | return 0; |
2687 | } | 2686 | } |
2688 | 2687 | ||
@@ -2707,7 +2706,6 @@ xlog_recover_do_efd_trans( | |||
2707 | xfs_log_item_t *lip; | 2706 | xfs_log_item_t *lip; |
2708 | int gen; | 2707 | int gen; |
2709 | __uint64_t efi_id; | 2708 | __uint64_t efi_id; |
2710 | SPLDECL(s); | ||
2711 | 2709 | ||
2712 | if (pass == XLOG_RECOVER_PASS1) { | 2710 | if (pass == XLOG_RECOVER_PASS1) { |
2713 | return; | 2711 | return; |
@@ -2725,7 +2723,7 @@ xlog_recover_do_efd_trans( | |||
2725 | * in the AIL. | 2723 | * in the AIL. |
2726 | */ | 2724 | */ |
2727 | mp = log->l_mp; | 2725 | mp = log->l_mp; |
2728 | AIL_LOCK(mp,s); | 2726 | spin_lock(&mp->m_ail_lock); |
2729 | lip = xfs_trans_first_ail(mp, &gen); | 2727 | lip = xfs_trans_first_ail(mp, &gen); |
2730 | while (lip != NULL) { | 2728 | while (lip != NULL) { |
2731 | if (lip->li_type == XFS_LI_EFI) { | 2729 | if (lip->li_type == XFS_LI_EFI) { |
@@ -2735,7 +2733,7 @@ xlog_recover_do_efd_trans( | |||
2735 | * xfs_trans_delete_ail() drops the | 2733 | * xfs_trans_delete_ail() drops the |
2736 | * AIL lock. | 2734 | * AIL lock. |
2737 | */ | 2735 | */ |
2738 | xfs_trans_delete_ail(mp, lip, s); | 2736 | xfs_trans_delete_ail(mp, lip); |
2739 | break; | 2737 | break; |
2740 | } | 2738 | } |
2741 | } | 2739 | } |
@@ -2749,7 +2747,7 @@ xlog_recover_do_efd_trans( | |||
2749 | if (lip != NULL) { | 2747 | if (lip != NULL) { |
2750 | xfs_efi_item_free(efip); | 2748 | xfs_efi_item_free(efip); |
2751 | } else { | 2749 | } else { |
2752 | AIL_UNLOCK(mp, s); | 2750 | spin_unlock(&mp->m_ail_lock); |
2753 | } | 2751 | } |
2754 | } | 2752 | } |
2755 | 2753 | ||
@@ -3075,10 +3073,9 @@ xlog_recover_process_efis( | |||
3075 | xfs_efi_log_item_t *efip; | 3073 | xfs_efi_log_item_t *efip; |
3076 | int gen; | 3074 | int gen; |
3077 | xfs_mount_t *mp; | 3075 | xfs_mount_t *mp; |
3078 | SPLDECL(s); | ||
3079 | 3076 | ||
3080 | mp = log->l_mp; | 3077 | mp = log->l_mp; |
3081 | AIL_LOCK(mp,s); | 3078 | spin_lock(&mp->m_ail_lock); |
3082 | 3079 | ||
3083 | lip = xfs_trans_first_ail(mp, &gen); | 3080 | lip = xfs_trans_first_ail(mp, &gen); |
3084 | while (lip != NULL) { | 3081 | while (lip != NULL) { |
@@ -3099,12 +3096,12 @@ xlog_recover_process_efis( | |||
3099 | continue; | 3096 | continue; |
3100 | } | 3097 | } |
3101 | 3098 | ||
3102 | AIL_UNLOCK(mp, s); | 3099 | spin_unlock(&mp->m_ail_lock); |
3103 | xlog_recover_process_efi(mp, efip); | 3100 | xlog_recover_process_efi(mp, efip); |
3104 | AIL_LOCK(mp,s); | 3101 | spin_lock(&mp->m_ail_lock); |
3105 | lip = xfs_trans_next_ail(mp, lip, &gen, NULL); | 3102 | lip = xfs_trans_next_ail(mp, lip, &gen, NULL); |
3106 | } | 3103 | } |
3107 | AIL_UNLOCK(mp, s); | 3104 | spin_unlock(&mp->m_ail_lock); |
3108 | } | 3105 | } |
3109 | 3106 | ||
3110 | /* | 3107 | /* |