]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: fix endianness issue in xfs_ag_shrink_space
authorDarrick J. Wong <djwong@kernel.org>
Fri, 15 Oct 2021 20:28:27 +0000 (16:28 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 15 Oct 2021 20:28:27 +0000 (16:28 -0400)
commita789987daf8632fe09d5bddf7aabd32ca3671f5d
tree3fa954e44bc46c58893945b8227d58b4859b0ea0
parent08602f165aa2d92a1d38270a2638c7a414119fcc
xfs: fix endianness issue in xfs_ag_shrink_space

Source kernel commit: a8f3522c9a1f4a31e93b17f2b5310a2b615f5581

The AGI buffer is in big-endian format, so we must convert the
endianness to CPU format to do any comparisons.

Fixes: 46141dc891f7 ("xfs: introduce xfs_ag_shrink_space()")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_ag.c