diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-28 19:27:32 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-06-28 19:27:32 -0700 |
commit | 9ce632a28a41bd9aeeaa3913d95b23648a82c2ee (patch) | |
tree | be33e14549bbef071ce6b0d23f45012a6876d437 /fs/xfs/xfs_icreate_item.c | |
parent | ddf92053e45c0e07dcb031b56512d52f98cde517 (diff) | |
download | linux-9ce632a28a41bd9aeeaa3913d95b23648a82c2ee.tar.gz linux-9ce632a28a41bd9aeeaa3913d95b23648a82c2ee.tar.bz2 linux-9ce632a28a41bd9aeeaa3913d95b23648a82c2ee.zip |
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_icreate_item.c')
-rw-r--r-- | fs/xfs/xfs_icreate_item.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/xfs/xfs_icreate_item.c b/fs/xfs/xfs_icreate_item.c index 9aceb35dce24..ac9918da5f4a 100644 --- a/fs/xfs/xfs_icreate_item.c +++ b/fs/xfs/xfs_icreate_item.c @@ -64,29 +64,13 @@ xfs_icreate_item_release( } /* - * Because we have ordered buffers being tracked in the AIL for the inode - * creation, we don't need the create item after this. Hence we can free - * the log item and return -1 to tell the caller we're done with the item. - */ -STATIC xfs_lsn_t -xfs_icreate_item_committed( - struct xfs_log_item *lip, - xfs_lsn_t lsn) -{ - struct xfs_icreate_item *icp = ICR_ITEM(lip); - - kmem_zone_free(xfs_icreate_zone, icp); - return (xfs_lsn_t)-1; -} - -/* * This is the ops vector shared by all buf log items. */ static const struct xfs_item_ops xfs_icreate_item_ops = { + .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED, .iop_size = xfs_icreate_item_size, .iop_format = xfs_icreate_item_format, .iop_release = xfs_icreate_item_release, - .iop_committed = xfs_icreate_item_committed, }; |