diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-05 01:31:21 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-10 18:56:41 +0300 |
commit | 52101dfe56f71d8cb140c2440d95affa25a53746 (patch) | |
tree | ccdc6d5c1ce39b27e6773c62bc16ca38984eea30 /fs/xfs/libxfs/xfs_rmap.c | |
parent | cec572561a748396c783c1ea91a289816d3c4f18 (diff) | |
download | linux-52101dfe56f71d8cb140c2440d95affa25a53746.tar.xz |
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.c | 2 |
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); |