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>
}
/* Swap the extents */
- error = xfrog_defragrange(file_fd->fd, &xdf);
+ error = -xfrog_defragrange(file_fd->fd, &xdf);
switch (error) {
case 0:
break;