diff options
author | Eric Sandeen <sandeen@redhat.com> | 2018-02-22 17:41:25 -0500 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-02-22 17:41:25 -0500 |
commit | 86516eff3b09a5fd17e81d50925bbccc6a36beed (patch) | |
tree | 5741c22fcd0ad28df935eaa1fc9dbede7b34c91f /fs | |
parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) |
xfs: use memset to initialize xfs_scrub_agfl_info
Apparently different gcc versions have competing and
incompatible notions of how to initialize at declaration,
so just give up and fall back to the time-tested memset().
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/scrub/agheader.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/scrub/agheader.c b/fs/xfs/scrub/agheader.c index fd975524f460..05c66e05ae20 100644 --- a/fs/xfs/scrub/agheader.c +++ b/fs/xfs/scrub/agheader.c | |||
@@ -767,7 +767,7 @@ int | |||
767 | xfs_scrub_agfl( | 767 | xfs_scrub_agfl( |
768 | struct xfs_scrub_context *sc) | 768 | struct xfs_scrub_context *sc) |
769 | { | 769 | { |
770 | struct xfs_scrub_agfl_info sai = { 0 }; | 770 | struct xfs_scrub_agfl_info sai; |
771 | struct xfs_agf *agf; | 771 | struct xfs_agf *agf; |
772 | xfs_agnumber_t agno; | 772 | xfs_agnumber_t agno; |
773 | unsigned int agflcount; | 773 | unsigned int agflcount; |
@@ -795,6 +795,7 @@ xfs_scrub_agfl( | |||
795 | xfs_scrub_block_set_corrupt(sc, sc->sa.agf_bp); | 795 | xfs_scrub_block_set_corrupt(sc, sc->sa.agf_bp); |
796 | goto out; | 796 | goto out; |
797 | } | 797 | } |
798 | memset(&sai, 0, sizeof(sai)); | ||
798 | sai.sz_entries = agflcount; | 799 | sai.sz_entries = agflcount; |
799 | sai.entries = kmem_zalloc(sizeof(xfs_agblock_t) * agflcount, KM_NOFS); | 800 | sai.entries = kmem_zalloc(sizeof(xfs_agblock_t) * agflcount, KM_NOFS); |
800 | if (!sai.entries) { | 801 | if (!sai.entries) { |