xfs: set firstfsb to NULLFSBLOCK before feeding it to _bmapi_write
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 17 Jul 2017 21:30:51 +0000 (14:30 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 20 Jul 2017 21:42:33 +0000 (14:42 -0700)
commit4c1a67bd3606540b9b42caff34a1d5cd94b1cf65
treeeedada57f2b1bdaf17f7604208f44ef4ce979926
parent1e86eabe73b73c82e1110c746ed3ec6d5e1c0a0d
xfs: set firstfsb to NULLFSBLOCK before feeding it to _bmapi_write

We must initialize the firstfsb parameter to _bmapi_write so that it
doesn't incorrectly treat stack garbage as a restriction on which AGs
it can search for free space.

Fixes-coverity-id: 1402025
Fixes-coverity-id: 1415167
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/xfs_reflink.c