Skip to content

Commit 06f67c4

Browse files
adam900710kdave
authored andcommitted
btrfs: use __u16 for the return value of btrfs_qgroup_level()
The qgroup level is limited to u16, so no need to use u64 for it. Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent cfdd459 commit 06f67c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fs/btrfs/qgroup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ bool btrfs_check_quota_leak(struct btrfs_fs_info *fs_info)
538538
if (qgroup->rsv.values[i]) {
539539
ret = true;
540540
btrfs_warn(fs_info,
541-
"qgroup %llu/%llu has unreleased space, type %d rsv %llu",
541+
"qgroup %hu/%llu has unreleased space, type %d rsv %llu",
542542
btrfs_qgroup_level(qgroup->qgroupid),
543543
btrfs_qgroup_subvolid(qgroup->qgroupid),
544544
i, qgroup->rsv.values[i]);

include/uapi/linux/btrfs_tree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,9 +913,9 @@ struct btrfs_free_space_info {
913913
#define BTRFS_FREE_SPACE_USING_BITMAPS (1ULL << 0)
914914

915915
#define BTRFS_QGROUP_LEVEL_SHIFT 48
916-
static inline __u64 btrfs_qgroup_level(__u64 qgroupid)
916+
static inline __u16 btrfs_qgroup_level(__u64 qgroupid)
917917
{
918-
return qgroupid >> BTRFS_QGROUP_LEVEL_SHIFT;
918+
return (__u16)(qgroupid >> BTRFS_QGROUP_LEVEL_SHIFT);
919919
}
920920

921921
/*

0 commit comments

Comments
 (0)