summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_icreate_item.c
diff options
context:
space:
mode:
authorCarlos Maiolino <cmaiolino@redhat.com>2018-10-18 17:21:39 +1100
committerDave Chinner <david@fromorbit.com>2018-10-18 17:21:39 +1100
commit26ca39015ef210d728df53d66c1ae85e8b48b2f3 (patch)
tree7008ec8f6605d864c0bc7c7449ddb2139ae98b95 /fs/xfs/xfs_icreate_item.c
parent41657e5507b13e963be906d5d874f4f02374fd5c (diff)
xfs: use offsetof() in place of offset macros for __xfsstats
Most offset macro mess is used in xfs_stats_format() only, and we can simply get the right offsets using offsetof(), instead of several macros to mark the offsets inside __xfsstats structure. Replace all XFSSTAT_END_* macros by a single helper macro to get the right offset into __xfsstats, and use this helper in xfs_stats_format() directly. The quota stats code, still looks a bit cleaner when using XFSSTAT_* macros, so, this patch also defines XFSSTAT_START_XQMSTAT and XFSSTAT_END_XQMSTAT locally to that code. This also should prevent offset mistakes when updates are done into __xfsstats. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_icreate_item.c')
0 files changed, 0 insertions, 0 deletions