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>
This commit is contained in:

committed by
Darrick J. Wong

parent
d15cbf2f38
commit
e8b78db77d
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user