summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong2018-05-05 00:31:21 +0200
committerDarrick J. Wong2018-05-10 17:56:41 +0200
commit52101dfe56f71d8cb140c2440d95affa25a53746 (patch)
treeccdc6d5c1ce39b27e6773c62bc16ca38984eea30
parentxfs: bmap debugging should never panic the system (diff)
downloadkernel-qcow2-linux-52101dfe56f71d8cb140c2440d95affa25a53746.tar.gz
kernel-qcow2-linux-52101dfe56f71d8cb140c2440d95affa25a53746.tar.xz
kernel-qcow2-linux-52101dfe56f71d8cb140c2440d95affa25a53746.zip
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>
-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);