aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans_ail.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-28 19:27:30 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-28 19:27:30 -0700
commite8b78db77d48fddd13fd249e88ab7bfffa0661fe (patch)
treed13297e84e976826afe811ae2051903e96a0f2a2 /fs/xfs/xfs_trans_ail.c
parentxfs: stop using XFS_LI_ABORTED as a parameter flag (diff)
downloadlinux-dev-e8b78db77d48fddd13fd249e88ab7bfffa0661fe.tar.xz
linux-dev-e8b78db77d48fddd13fd249e88ab7bfffa0661fe.zip
xfs: don't require log items to implement optional methods
Just check if they are present first. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_trans_ail.c')
-rw-r--r--fs/xfs/xfs_trans_ail.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index 58013696778d..bbeb196cc5e0 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -348,6 +348,14 @@ xfsaild_push_item(
if (XFS_TEST_ERROR(false, ailp->ail_mount, XFS_ERRTAG_LOG_ITEM_PIN))
return XFS_ITEM_PINNED;
+ /*
+ * Consider the item pinned if a push callback is not defined so the
+ * caller will force the log. This should only happen for intent items
+ * as they are unpinned once the associated done item is committed to
+ * the on-disk log.
+ */
+ if (!lip->li_ops->iop_push)
+ return XFS_ITEM_PINNED;
return lip->li_ops->iop_push(lip, &ailp->ail_buf_list);
}