diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-09-19 10:24:27 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-09-19 10:24:27 +1000 |
commit | cd00158ce34d6e2c42d8892e8499779b8ac1d2bf (patch) | |
tree | d35fb35e93820365979f4c8f8f293ab5d354b439 /fs/xfs/xfs_super.c | |
parent | ea78d80866ce375defb2fdd1c8a3aafec95e0f85 (diff) | |
download | linux-cd00158ce34d6e2c42d8892e8499779b8ac1d2bf.tar.bz2 |
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.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index fd6be45b3a1e..340975392e91 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; |