xfs: refactor scrub context initialization
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 16 Apr 2019 15:21:59 +0000 (08:21 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 16 Apr 2019 17:01:57 +0000 (10:01 -0700)
commit9d71e15586fd7d274a23dd0bbf54278c86fe263f
treec9b612cbe1ae9ff88ec1ed53aed310d6c98ba858
parent89d139d5ad465e35a9c602421eb1a1ff08ea530d
xfs: refactor scrub context initialization

It's a little silly how the memset in scrub context initialization
forces us to declare stack variables to preserve context variables
across a retry.  Since the teardown functions already null out most of
the ephemeral state (buffer pointers, btree cursors, etc.), just skip
the memset and move the initialization as needed.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/scrub.c