aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_extfree_item.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
-rw-r--r--fs/xfs/xfs_extfree_item.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index f938a51be81b..132bd07b9bb8 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -110,19 +110,18 @@ STATIC void
110xfs_efi_item_unpin(xfs_efi_log_item_t *efip, int stale) 110xfs_efi_item_unpin(xfs_efi_log_item_t *efip, int stale)
111{ 111{
112 xfs_mount_t *mp; 112 xfs_mount_t *mp;
113 SPLDECL(s);
114 113
115 mp = efip->efi_item.li_mountp; 114 mp = efip->efi_item.li_mountp;
116 AIL_LOCK(mp, s); 115 spin_lock(&mp->m_ail_lock);
117 if (efip->efi_flags & XFS_EFI_CANCELED) { 116 if (efip->efi_flags & XFS_EFI_CANCELED) {
118 /* 117 /*
119 * xfs_trans_delete_ail() drops the AIL lock. 118 * xfs_trans_delete_ail() drops the AIL lock.
120 */ 119 */
121 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s); 120 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
122 xfs_efi_item_free(efip); 121 xfs_efi_item_free(efip);
123 } else { 122 } else {
124 efip->efi_flags |= XFS_EFI_COMMITTED; 123 efip->efi_flags |= XFS_EFI_COMMITTED;
125 AIL_UNLOCK(mp, s); 124 spin_unlock(&mp->m_ail_lock);
126 } 125 }
127} 126}
128 127
@@ -138,10 +137,9 @@ xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp)
138{ 137{
139 xfs_mount_t *mp; 138 xfs_mount_t *mp;
140 xfs_log_item_desc_t *lidp; 139 xfs_log_item_desc_t *lidp;
141 SPLDECL(s);
142 140
143 mp = efip->efi_item.li_mountp; 141 mp = efip->efi_item.li_mountp;
144 AIL_LOCK(mp, s); 142 spin_lock(&mp->m_ail_lock);
145 if (efip->efi_flags & XFS_EFI_CANCELED) { 143 if (efip->efi_flags & XFS_EFI_CANCELED) {
146 /* 144 /*
147 * free the xaction descriptor pointing to this item 145 * free the xaction descriptor pointing to this item
@@ -152,11 +150,11 @@ xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp)
152 * pull the item off the AIL. 150 * pull the item off the AIL.
153 * xfs_trans_delete_ail() drops the AIL lock. 151 * xfs_trans_delete_ail() drops the AIL lock.
154 */ 152 */
155 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s); 153 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
156 xfs_efi_item_free(efip); 154 xfs_efi_item_free(efip);
157 } else { 155 } else {
158 efip->efi_flags |= XFS_EFI_COMMITTED; 156 efip->efi_flags |= XFS_EFI_COMMITTED;
159 AIL_UNLOCK(mp, s); 157 spin_unlock(&mp->m_ail_lock);
160 } 158 }
161} 159}
162 160
@@ -350,13 +348,12 @@ xfs_efi_release(xfs_efi_log_item_t *efip,
350{ 348{
351 xfs_mount_t *mp; 349 xfs_mount_t *mp;
352 int extents_left; 350 int extents_left;
353 SPLDECL(s);
354 351
355 mp = efip->efi_item.li_mountp; 352 mp = efip->efi_item.li_mountp;
356 ASSERT(efip->efi_next_extent > 0); 353 ASSERT(efip->efi_next_extent > 0);
357 ASSERT(efip->efi_flags & XFS_EFI_COMMITTED); 354 ASSERT(efip->efi_flags & XFS_EFI_COMMITTED);
358 355
359 AIL_LOCK(mp, s); 356 spin_lock(&mp->m_ail_lock);
360 ASSERT(efip->efi_next_extent >= nextents); 357 ASSERT(efip->efi_next_extent >= nextents);
361 efip->efi_next_extent -= nextents; 358 efip->efi_next_extent -= nextents;
362 extents_left = efip->efi_next_extent; 359 extents_left = efip->efi_next_extent;
@@ -364,10 +361,10 @@ xfs_efi_release(xfs_efi_log_item_t *efip,
364 /* 361 /*
365 * xfs_trans_delete_ail() drops the AIL lock. 362 * xfs_trans_delete_ail() drops the AIL lock.
366 */ 363 */
367 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s); 364 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
368 xfs_efi_item_free(efip); 365 xfs_efi_item_free(efip);
369 } else { 366 } else {
370 AIL_UNLOCK(mp, s); 367 spin_unlock(&mp->m_ail_lock);
371 } 368 }
372} 369}
373 370