]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
fsr: package function should check for negative errors
authorCarlos Maiolino <cem@kernel.org>
Tue, 7 Apr 2026 11:14:59 +0000 (13:14 +0200)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 8 Apr 2026 19:39:57 +0000 (21:39 +0200)
commitbf1007391a32518f15283a032e68ca25402ca652
treee606695ab683d4f577048d8b9a3814a74c6cb825
parent50d29084e53a05b7337b598aa39d7c8c64e9c74b
fsr: package function should check for negative errors

xfrog_defragrange as most other functions from libfrog return
a negative error value, while xfs_fsr's packfile(), expects
a positive error value.

Whenever xfrog_defragrange fails, the switch case always falls into the
default clausule, making the error message pointless.
Fix this by inverting xfrog_defragrange() return value call.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
fsr/xfs_fsr.c