diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-05-01 16:00:54 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-05-08 08:50:00 -0700 |
commit | 86a37174138621a44c38621b69595e2cd67e5956 (patch) | |
tree | 03bbfe68e9e9b2401d8f3fe0fdecaa4d605a89df /fs/xfs/xfs_trans_ail.c | |
parent | 154c733a33d9cdaabec42ae76ca1189044d0447e (diff) | |
download | linux-stable-86a37174138621a44c38621b69595e2cd67e5956.tar.gz linux-stable-86a37174138621a44c38621b69595e2cd67e5956.tar.bz2 linux-stable-86a37174138621a44c38621b69595e2cd67e5956.zip |
xfs: refactor adding recovered intent items to the log
During recovery, every intent that we recover from the log has to be
added to the AIL. Replace the open-coded addition with a helper.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Diffstat (limited to 'fs/xfs/xfs_trans_ail.c')
-rw-r--r-- | fs/xfs/xfs_trans_ail.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index bf09d4b4df58..ac5019361a13 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c @@ -815,6 +815,17 @@ xfs_trans_ail_update_bulk( xfs_ail_update_finish(ailp, tail_lsn); } +/* Insert a log item into the AIL. */ +void +xfs_trans_ail_insert( + struct xfs_ail *ailp, + struct xfs_log_item *lip, + xfs_lsn_t lsn) +{ + spin_lock(&ailp->ail_lock); + xfs_trans_ail_update_bulk(ailp, NULL, &lip, 1, lsn); +} + /* * Delete one log item from the AIL. * |