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_extfree_item.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_extfree_item.c')
-rw-r--r-- | fs/xfs/xfs_extfree_item.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c index 8aa28f751b2a..f1dcd80cf066 100644 --- a/fs/xfs/xfs_extfree_item.c +++ b/fs/xfs/xfs_extfree_item.c | |||
@@ -111,7 +111,7 @@ xfs_efi_item_unpin(xfs_efi_log_item_t *efip, int stale) | |||
111 | xfs_mount_t *mp; | 111 | xfs_mount_t *mp; |
112 | 112 | ||
113 | mp = efip->efi_item.li_mountp; | 113 | mp = efip->efi_item.li_mountp; |
114 | spin_lock(&mp->m_ail_lock); | 114 | spin_lock(&mp->m_ail->xa_lock); |
115 | if (efip->efi_flags & XFS_EFI_CANCELED) { | 115 | if (efip->efi_flags & XFS_EFI_CANCELED) { |
116 | /* | 116 | /* |
117 | * xfs_trans_delete_ail() drops the AIL lock. | 117 | * xfs_trans_delete_ail() drops the AIL lock. |
@@ -120,7 +120,7 @@ xfs_efi_item_unpin(xfs_efi_log_item_t *efip, int stale) | |||
120 | xfs_efi_item_free(efip); | 120 | xfs_efi_item_free(efip); |
121 | } else { | 121 | } else { |
122 | efip->efi_flags |= XFS_EFI_COMMITTED; | 122 | efip->efi_flags |= XFS_EFI_COMMITTED; |
123 | spin_unlock(&mp->m_ail_lock); | 123 | spin_unlock(&mp->m_ail->xa_lock); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | 126 | ||
@@ -138,7 +138,7 @@ xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp) | |||
138 | xfs_log_item_desc_t *lidp; | 138 | xfs_log_item_desc_t *lidp; |
139 | 139 | ||
140 | mp = efip->efi_item.li_mountp; | 140 | mp = efip->efi_item.li_mountp; |
141 | spin_lock(&mp->m_ail_lock); | 141 | spin_lock(&mp->m_ail->xa_lock); |
142 | if (efip->efi_flags & XFS_EFI_CANCELED) { | 142 | if (efip->efi_flags & XFS_EFI_CANCELED) { |
143 | /* | 143 | /* |
144 | * free the xaction descriptor pointing to this item | 144 | * free the xaction descriptor pointing to this item |
@@ -153,7 +153,7 @@ xfs_efi_item_unpin_remove(xfs_efi_log_item_t *efip, xfs_trans_t *tp) | |||
153 | xfs_efi_item_free(efip); | 153 | xfs_efi_item_free(efip); |
154 | } else { | 154 | } else { |
155 | efip->efi_flags |= XFS_EFI_COMMITTED; | 155 | efip->efi_flags |= XFS_EFI_COMMITTED; |
156 | spin_unlock(&mp->m_ail_lock); | 156 | spin_unlock(&mp->m_ail->xa_lock); |
157 | } | 157 | } |
158 | } | 158 | } |
159 | 159 | ||
@@ -352,7 +352,7 @@ xfs_efi_release(xfs_efi_log_item_t *efip, | |||
352 | ASSERT(efip->efi_next_extent > 0); | 352 | ASSERT(efip->efi_next_extent > 0); |
353 | ASSERT(efip->efi_flags & XFS_EFI_COMMITTED); | 353 | ASSERT(efip->efi_flags & XFS_EFI_COMMITTED); |
354 | 354 | ||
355 | spin_lock(&mp->m_ail_lock); | 355 | spin_lock(&mp->m_ail->xa_lock); |
356 | ASSERT(efip->efi_next_extent >= nextents); | 356 | ASSERT(efip->efi_next_extent >= nextents); |
357 | efip->efi_next_extent -= nextents; | 357 | efip->efi_next_extent -= nextents; |
358 | extents_left = efip->efi_next_extent; | 358 | extents_left = efip->efi_next_extent; |
@@ -363,7 +363,7 @@ xfs_efi_release(xfs_efi_log_item_t *efip, | |||
363 | xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip); | 363 | xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip); |
364 | xfs_efi_item_free(efip); | 364 | xfs_efi_item_free(efip); |
365 | } else { | 365 | } else { |
366 | spin_unlock(&mp->m_ail_lock); | 366 | spin_unlock(&mp->m_ail->xa_lock); |
367 | } | 367 | } |
368 | } | 368 | } |
369 | 369 | ||