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.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index dab57374e1fe..05a4bdd4be39 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -108,17 +108,12 @@ xfs_efi_item_pin(xfs_efi_log_item_t *efip)
108STATIC void 108STATIC void
109xfs_efi_item_unpin(xfs_efi_log_item_t *efip, int stale) 109xfs_efi_item_unpin(xfs_efi_log_item_t *efip, int stale)
110{ 110{
111 xfs_mount_t *mp; 111 struct xfs_ail *ailp = efip->efi_item.li_ailp;
112 struct xfs_ail *ailp;
113 112
114 mp = efip->efi_item.li_mountp;
115 ailp = efip->efi_item.li_ailp;
116 spin_lock(&ailp->xa_lock); 113 spin_lock(&ailp->xa_lock);
117 if (efip->efi_flags & XFS_EFI_CANCELED) { 114 if (efip->efi_flags & XFS_EFI_CANCELED) {
118 /* 115 /* xfs_trans_ail_delete() drops the AIL lock. */
119 * xfs_trans_delete_ail() drops the AIL lock. 116 xfs_trans_ail_delete(ailp, (xfs_log_item_t *)efip);
120 */
121 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
122 xfs_efi_item_free(efip); 117 xfs_efi_item_free(efip);
123 } else { 118 } else {
124 efip->efi_flags |= XFS_EFI_COMMITTED; 119 efip->efi_flags |= XFS_EFI_COMMITTED;
@@ -136,12 +131,9 @@ xfs_efi_item_unpin(xfs_efi_log_item_t *efip, int stale)
136STATIC void 131STATIC void
137xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp) 132xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp)
138{ 133{
139 xfs_mount_t *mp; 134 struct xfs_ail *ailp = efip->efi_item.li_ailp;
140 struct xfs_ail *ailp;
141 xfs_log_item_desc_t *lidp; 135 xfs_log_item_desc_t *lidp;
142 136
143 mp = efip->efi_item.li_mountp;
144 ailp = efip->efi_item.li_ailp;
145 spin_lock(&ailp->xa_lock); 137 spin_lock(&ailp->xa_lock);
146 if (efip->efi_flags & XFS_EFI_CANCELED) { 138 if (efip->efi_flags & XFS_EFI_CANCELED) {
147 /* 139 /*
@@ -149,11 +141,9 @@ xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp)
149 */ 141 */
150 lidp = xfs_trans_find_item(tp, (xfs_log_item_t *) efip); 142 lidp = xfs_trans_find_item(tp, (xfs_log_item_t *) efip);
151 xfs_trans_free_item(tp, lidp); 143 xfs_trans_free_item(tp, lidp);
152 /* 144
153 * pull the item off the AIL. 145 /* xfs_trans_ail_delete() drops the AIL lock. */
154 * xfs_trans_delete_ail() drops the AIL lock. 146 xfs_trans_ail_delete(ailp, (xfs_log_item_t *)efip);
155 */
156 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
157 xfs_efi_item_free(efip); 147 xfs_efi_item_free(efip);
158 } else { 148 } else {
159 efip->efi_flags |= XFS_EFI_COMMITTED; 149 efip->efi_flags |= XFS_EFI_COMMITTED;
@@ -350,12 +340,9 @@ void
350xfs_efi_release(xfs_efi_log_item_t *efip, 340xfs_efi_release(xfs_efi_log_item_t *efip,
351 uint nextents) 341 uint nextents)
352{ 342{
353 xfs_mount_t *mp; 343 struct xfs_ail *ailp = efip->efi_item.li_ailp;
354 struct xfs_ail *ailp;
355 int extents_left; 344 int extents_left;
356 345
357 mp = efip->efi_item.li_mountp;
358 ailp = efip->efi_item.li_ailp;
359 ASSERT(efip->efi_next_extent > 0); 346 ASSERT(efip->efi_next_extent > 0);
360 ASSERT(efip->efi_flags & XFS_EFI_COMMITTED); 347 ASSERT(efip->efi_flags & XFS_EFI_COMMITTED);
361 348
@@ -364,10 +351,8 @@ xfs_efi_release(xfs_efi_log_item_t *efip,
364 efip->efi_next_extent -= nextents; 351 efip->efi_next_extent -= nextents;
365 extents_left = efip->efi_next_extent; 352 extents_left = efip->efi_next_extent;
366 if (extents_left == 0) { 353 if (extents_left == 0) {
367 /* 354 /* xfs_trans_ail_delete() drops the AIL lock. */
368 * xfs_trans_delete_ail() drops the AIL lock. 355 xfs_trans_ail_delete(ailp, (xfs_log_item_t *)efip);
369 */
370 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip);
371 xfs_efi_item_free(efip); 356 xfs_efi_item_free(efip);
372 } else { 357 } else {
373 spin_unlock(&ailp->xa_lock); 358 spin_unlock(&ailp->xa_lock);