]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: xfs_rtbuf_get should check the bmapi_read results
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 28 Jun 2018 20:11:57 +0000 (15:11 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Jun 2018 20:11:57 +0000 (15:11 -0500)
commit5e28c9c80acc4ef2dbf25853e4c18fec258779ce
tree232a2a7ebeb7883cbabc271d5dc808e8c2c7a5c3
parenta531149e9b6f9b5e481e0fe97438316fd978ebc4
xfs: xfs_rtbuf_get should check the bmapi_read results

Source kernel commit: a03f1641c7a6d4e88c6aae0cd3d52305cdb967a0

The xfs_rtbuf_get function should check the block mapping it gets back
from bmapi_read.  If there are no mappings or the mapping isn't a real
extent, we should return -EFSCORRUPTED rather than trying to read a
garbage value.  We also require realtime bitmap blocks to be real,
written allocations.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_rtbitmap.c