Skip to content

Commit

Permalink
vfs_ceph: explicit cast to uint64_t upon failure of ceph_statfs
Browse files Browse the repository at this point in the history
When a call to 'ceph_statfs' from with 'cephwrap_disk_free' returns
non-zero status do an explicit cast to uint64_t for the negative (-1)
value returned by 'status_code'.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15686

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
(cherry picked from commit a7d34ec597fe810090d28bfda636b7450ecb06e5)
  • Loading branch information
synarete authored and Jule Anger committed Aug 22, 2024
1 parent 67c90de commit 92712fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source3/modules/vfs_ceph.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ static uint64_t cephwrap_disk_free(struct vfs_handle_struct *handle,
return *dfree;
} else {
DBG_DEBUG("[CEPH] ceph_statfs returned %d\n", ret);
return status_code(ret);
return (uint64_t)status_code(ret);
}
}

Expand Down

0 comments on commit 92712fc

Please sign in to comment.