]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix uninitialized variables in xrep_calc_ag_resblks
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Mar 2021 16:51:51 +0000 (09:51 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 25 Mar 2021 23:47:49 +0000 (16:47 -0700)
commit8b9b5ff2553f90422f3a2168d9c2d5a2fc6eea24
tree506834debac44eb4611e16a53d806f431a5f9d33
parenta084785daf4166a6d1479ad13159ed2bf1543407
xfs: fix uninitialized variables in xrep_calc_ag_resblks

If we can't read the AGF header, we never actually set a value for
freelen and usedlen.  These two variables are used to make the worst
case estimate of btree size, so it's safe to set them to the AG size as
a fallback.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/repair.c