summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_rmap.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-05-04 15:31:21 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-05-10 08:56:41 -0700
commit52101dfe56f71d8cb140c2440d95affa25a53746 (patch)
treeccdc6d5c1ce39b27e6773c62bc16ca38984eea30 /fs/xfs/libxfs/xfs_rmap.c
parentcec572561a748396c783c1ea91a289816d3c4f18 (diff)
downloadlinux-52101dfe56f71d8cb140c2440d95affa25a53746.tar.bz2
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_rmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index fba8d2718017..f7769edf5b68 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -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);