]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: xfs_rtbuf_get should check the bmapi_read results
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 31 May 2018 16:07:20 +0000 (09:07 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 1 Jun 2018 16:00:16 +0000 (09:00 -0700)
commit8cec9e618ba3352155b89c79cecdf9138e60ae82
treeceecf2dfa644f0ffc630c08c651e9fbecf6c2754
parent9336e3655ee65c0440ae36b78c061559d64493cc
xfs: xfs_rtbuf_get should check the bmapi_read results

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>
fs/xfs/libxfs/xfs_rtbitmap.c