summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-06-22 02:26:57 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2018-06-24 14:56:36 -0400
commit232d0a24b0fc197c50e95fe65f236027b5fa1b74 (patch)
tree5292bd93c732e6fc5e10c79d77386b22fccc9d3b /fs
parent5bd88d153998c1b189fdeb8b8bd4cce36b5acf62 (diff)
xfs: fix uninitialized field in rtbitmap fsmap backend
Initialize the extent count field of the high key so that when we use the high key to synthesize an 'unknown owner' record (i.e. used space record) at the end of the queried range we have a field with which to compute rm_blockcount. This is not strictly necessary because the synthesizer never uses the rm_blockcount field, but we can shut up the static code analysis anyway. Coverity-id: 1437358 Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_fsmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c
index c34fa9c342f2..c7157bc48bd1 100644
--- a/fs/xfs/xfs_fsmap.c
+++ b/fs/xfs/xfs_fsmap.c
@@ -513,8 +513,8 @@ xfs_getfsmap_rtdev_rtbitmap_query(
513 struct xfs_trans *tp, 513 struct xfs_trans *tp,
514 struct xfs_getfsmap_info *info) 514 struct xfs_getfsmap_info *info)
515{ 515{
516 struct xfs_rtalloc_rec alow; 516 struct xfs_rtalloc_rec alow = { 0 };
517 struct xfs_rtalloc_rec ahigh; 517 struct xfs_rtalloc_rec ahigh = { 0 };
518 int error; 518 int error;
519 519
520 xfs_ilock(tp->t_mountp->m_rbmip, XFS_ILOCK_SHARED); 520 xfs_ilock(tp->t_mountp->m_rbmip, XFS_ILOCK_SHARED);