summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf_item.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2015-08-19 10:01:08 +1000
committerDave Chinner <david@fromorbit.com>2015-08-19 10:01:08 +1000
commit146e54b71ea4b998d65c25964807ff6792bbf436 (patch)
tree2fc5a2db363067cbdec6718318769d188c11a161 /fs/xfs/xfs_buf_item.c
parentf307080a626569f89bc8fbad9f936b307aded877 (diff)
downloadblackbird-obmc-linux-146e54b71ea4b998d65c25964807ff6792bbf436.tar.gz
blackbird-obmc-linux-146e54b71ea4b998d65c25964807ff6792bbf436.zip
xfs: add helper to conditionally remove items from the AIL
Several areas of code duplicate a pattern where we take the AIL lock, check whether an item is in the AIL and remove it if so. Create a new helper for this pattern and use it where appropriate. Signed-off-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_buf_item.c')
-rw-r--r--fs/xfs/xfs_buf_item.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 092d652bc03d..919057e0a45b 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -647,11 +647,7 @@ xfs_buf_item_unlock(
xfs_buf_item_relse(bp);
else if (aborted) {
ASSERT(XFS_FORCED_SHUTDOWN(lip->li_mountp));
- if (lip->li_flags & XFS_LI_IN_AIL) {
- spin_lock(&lip->li_ailp->xa_lock);
- xfs_trans_ail_delete(lip->li_ailp, lip,
- SHUTDOWN_LOG_IO_ERROR);
- }
+ xfs_trans_ail_remove(lip, SHUTDOWN_LOG_IO_ERROR);
xfs_buf_item_relse(bp);
}
}
OpenPOWER on IntegriCloud