提交 854d2c35 编写于 作者: S Sage Weil 提交者: Chris Mason

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: NSage Weil <sage@newdream.net>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册