summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-09-19 10:24:27 +1000
committerDave Chinner <david@fromorbit.com>2016-09-19 10:24:27 +1000
commitcd00158ce34d6e2c42d8892e8499779b8ac1d2bf (patch)
treed35fb35e93820365979f4c8f8f293ab5d354b439 /fs/xfs/xfs_super.c
parentea78d80866ce375defb2fdd1c8a3aafec95e0f85 (diff)
downloadop-kernel-dev-cd00158ce34d6e2c42d8892e8499779b8ac1d2bf.zip
op-kernel-dev-cd00158ce34d6e2c42d8892e8499779b8ac1d2bf.tar.gz
xfs: convert RUI log formats to use variable length arrays
Use variable length array declarations for RUI log items, and replace the open coded sizeof formulae with a single function. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index fd6be45..3409753 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1782,9 +1782,8 @@ xfs_init_zones(void)
if (!xfs_rud_zone)
goto out_destroy_icreate_zone;
- xfs_rui_zone = kmem_zone_init((sizeof(struct xfs_rui_log_item) +
- ((XFS_RUI_MAX_FAST_EXTENTS - 1) *
- sizeof(struct xfs_map_extent))),
+ xfs_rui_zone = kmem_zone_init(
+ xfs_rui_log_item_sizeof(XFS_RUI_MAX_FAST_EXTENTS),
"xfs_rui_item");
if (!xfs_rui_zone)
goto out_destroy_rud_zone;
OpenPOWER on IntegriCloud