commit | 526995675f88704779fbb89848086e5cb310f028 | [log] [tgz] |
---|---|---|
author | Darrick J. Wong <darrick.wong@oracle.com> | Wed Aug 28 20:35:19 2019 -0700 |
committer | Darrick J. Wong <darrick.wong@oracle.com> | Thu Aug 29 21:08:37 2019 -0700 |
tree | 382d2a24fda882c29699b698b6ae158c42e98800 | |
parent | 9f12a2317111179689e290e4d8114b1f072d356e [diff] |
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. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>