]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: add missing rmap error return
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 28 Jun 2018 20:11:55 +0000 (15:11 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Jun 2018 20:11:55 +0000 (15:11 -0500)
Source kernel commit: 52101dfe56f71d8cb140c2440d95affa25a53746

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_rmap.c

index 09f74a5f48a5769f9cf7eeb0492ddb4df83c134f..7ed30917927fc159466fc77631214f01e6dfc111 100644 (file)
@@ -1372,6 +1372,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);