xfs: add missing rmap error return

xfs_rmap_lookup_le_range can return errors, so we need to check for
them and bail out.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
Darrick J. Wong 2018-05-04 15:31:21 -07:00
parent cec572561a
commit 52101dfe56

View File

@ -1374,6 +1374,8 @@ xfs_rmap_convert_shared(
*/ */
error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags, error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags,
&PREV, &i); &PREV, &i);
if (error)
goto done;
XFS_WANT_CORRUPTED_GOTO(mp, i == 1, done); XFS_WANT_CORRUPTED_GOTO(mp, i == 1, done);
ASSERT(PREV.rm_offset <= offset); ASSERT(PREV.rm_offset <= offset);