diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-03-23 10:10:00 +1100 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-05-19 09:58:07 -0500 |
commit | 43f5efc5b59db1b66e39fe9fdfc4ba6a27152afa (patch) | |
tree | 100e2b49e622e6933d8f88e052076e23bd943ae1 /fs/xfs/xfs_extfree_item.c | |
parent | e2a07812e93d4a51b1b1a6f15145a1634948db47 (diff) | |
download | blackbird-op-linux-43f5efc5b59db1b66e39fe9fdfc4ba6a27152afa.tar.gz blackbird-op-linux-43f5efc5b59db1b66e39fe9fdfc4ba6a27152afa.zip |
xfs: factor log item initialisation
Each log item type does manual initialisation of the log item.
Delayed logging introduces new fields that need initialisation, so
factor all the open coded initialisation into a common function
first.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
-rw-r--r-- | fs/xfs/xfs_extfree_item.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c index 6f35ed1b39b9..e461e93b0350 100644 --- a/fs/xfs/xfs_extfree_item.c +++ b/fs/xfs/xfs_extfree_item.c @@ -259,10 +259,7 @@ xfs_efi_init(xfs_mount_t *mp, KM_SLEEP); } - efip->efi_item.li_type = XFS_LI_EFI; - efip->efi_item.li_ops = &xfs_efi_item_ops; - efip->efi_item.li_mountp = mp; - efip->efi_item.li_ailp = mp->m_ail; + xfs_log_item_init(mp, &efip->efi_item, XFS_LI_EFI, &xfs_efi_item_ops); efip->efi_format.efi_nextents = nextents; efip->efi_format.efi_id = (__psint_t)(void*)efip; @@ -554,10 +551,7 @@ xfs_efd_init(xfs_mount_t *mp, KM_SLEEP); } - efdp->efd_item.li_type = XFS_LI_EFD; - efdp->efd_item.li_ops = &xfs_efd_item_ops; - efdp->efd_item.li_mountp = mp; - efdp->efd_item.li_ailp = mp->m_ail; + xfs_log_item_init(mp, &efdp->efd_item, XFS_LI_EFD, &xfs_efd_item_ops); efdp->efd_efip = efip; efdp->efd_format.efd_nextents = nextents; efdp->efd_format.efd_efi_id = efip->efi_format.efi_id; |