summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_trans.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-29 05:27:32 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-29 05:27:32 +0300
commit9ce632a28a41bd9aeeaa3913d95b23648a82c2ee (patch)
treebe33e14549bbef071ce6b0d23f45012a6876d437 /fs/xfs/xfs_trans.c
parentddf92053e45c0e07dcb031b56512d52f98cde517 (diff)
downloadlinux-9ce632a28a41bd9aeeaa3913d95b23648a82c2ee.tar.xz
xfs: add a flag to release log items on commit
We have various items that are released from ->iop_comitting. Add a flag to just call ->iop_release from the commit path to avoid tons of boilerplate code. 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.c')
-rw-r--r--fs/xfs/xfs_trans.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 261c51486d7a..b026f87608ce 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -851,6 +851,12 @@ xfs_trans_committed_bulk(
if (aborted)
set_bit(XFS_LI_ABORTED, &lip->li_flags);
+
+ if (lip->li_ops->flags & XFS_ITEM_RELEASE_WHEN_COMMITTED) {
+ lip->li_ops->iop_release(lip);
+ continue;
+ }
+
if (lip->li_ops->iop_committed)
item_lsn = lip->li_ops->iop_committed(lip, commit_lsn);
else