diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-08-27 03:06:02 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-08-28 18:31:01 +0300 |
commit | b521c89027f4b86af418083cb75db60a0e7a5997 (patch) | |
tree | 0aa5387e6c142b5fd320f9cfe4966bc733545fed /fs/xfs/libxfs/xfs_rmap.h | |
parent | 7380e8fec16b3527baa1153255da9cc8d5d4d309 (diff) | |
download | linux-b521c89027f4b86af418083cb75db60a0e7a5997.tar.xz |
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap.h')
0 files changed, 0 insertions, 0 deletions