diff options
author | Brian Foster <bfoster@redhat.com> | 2015-08-19 10:01:08 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-08-19 10:01:08 +1000 |
commit | 146e54b71ea4b998d65c25964807ff6792bbf436 (patch) | |
tree | 2fc5a2db363067cbdec6718318769d188c11a161 /fs/xfs/xfs_buf_item.c | |
parent | f307080a626569f89bc8fbad9f936b307aded877 (diff) | |
download | linux-146e54b71ea4b998d65c25964807ff6792bbf436.tar.bz2 |
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.c | 6 |
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); } } |