diff options
author | Carlos Maiolino <cmaiolino@redhat.com> | 2018-10-18 08:21:39 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2018-10-18 08:21:39 +0200 |
commit | 26ca39015ef210d728df53d66c1ae85e8b48b2f3 (patch) | |
tree | 7008ec8f6605d864c0bc7c7449ddb2139ae98b95 /crypto/dh.c | |
parent | xfs: Fix xqmstats offsets in /proc/fs/xfs/xqmstat (diff) | |
download | linux-26ca39015ef210d728df53d66c1ae85e8b48b2f3.tar.xz linux-26ca39015ef210d728df53d66c1ae85e8b48b2f3.zip |
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 'crypto/dh.c')
0 files changed, 0 insertions, 0 deletions