xfs: don't assume a left rmap when allocating a new rmap
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 17 Jul 2018 21:24:11 +0000 (14:24 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 17 Jul 2018 21:25:57 +0000 (14:25 -0700)
commitfa248de98a6beb9ceaec5059041d65f87ac438b4
treea227802bfbef395c314472808c2f3f878daee9e0
parentefe803277364a621348b679058222d644e113c9c
xfs: don't assume a left rmap when allocating a new rmap

The original rmap code assumed that there would always be at least one
rmap in the rmapbt (the AG sb/agf/agi) and so errored out if it didn't
find one.  This assumption isn't true for the rmapbt repair function
(and it won't be true for realtime rmap either), so remove the check and
just deal with the situation.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
fs/xfs/libxfs/xfs_rmap.c