Searched hist:b521c890 (Results 1 - 1 of 1) sorted by relevance

/linux-master/fs/xfs/libxfs/
H A Dxfs_bmap_btree.cdiff b521c890 Mon Aug 26 18:06:02 MDT 2019 Darrick J. Wong <darrick.wong@oracle.com> xfs: fix sign handling problem in xfs_bmbt_diff_two_keys

In xfs_bmbt_diff_two_keys, we perform a signed int64_t subtraction with
two unsigned 64-bit quantities. If the second quantity is actually the
"maximum" key (all ones) as used in _query_all, the subtraction
effectively becomes addition of two positive numbers and the function
returns incorrect results. Fix this with explicit comparisons of the
unsigned values. Nobody needs this now, but the online repair patches
will need this to work properly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>

Completed in 382 milliseconds