Skip to content

Commit

Permalink
xfs: add missing rmap error return
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Darrick J. Wong committed May 10, 2018
1 parent cec5725 commit 52101df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/xfs/libxfs/xfs_rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,8 @@ xfs_rmap_convert_shared(
*/
error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags,
&PREV, &i);
if (error)
goto done;
XFS_WANT_CORRUPTED_GOTO(mp, i == 1, done);

ASSERT(PREV.rm_offset <= offset);
Expand Down

0 comments on commit 52101df

Please sign in to comment.