Commit 854d2c35 authored by Sage Weil's avatar Sage Weil Committed by Chris Mason
Browse files

Btrfs: fix search_ioctl key advance

key->type is u8, not u64.

fs/btrfs/ioctl.c: In function 'copy_to_sk':
fs/btrfs/ioctl.c:1024: warning: comparison is always true due to limited range of data type
Signed-off-by: default avatarSage Weil <>
Signed-off-by: default avatarChris Mason <>
parent ef5780c0
...@@ -1000,7 +1000,7 @@ static noinline int copy_to_sk(struct btrfs_root *root, ...@@ -1000,7 +1000,7 @@ static noinline int copy_to_sk(struct btrfs_root *root,
advance_key: advance_key:
if (key->offset < (u64)-1) if (key->offset < (u64)-1)
key->offset++; key->offset++;
else if (key->type < (u64)-1) else if (key->type < (u8)-1)
key->type++; key->type++;
else if (key->objectid < (u64)-1) else if (key->objectid < (u64)-1)
key->objectid++; key->objectid++;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment