[PATCH] btrfs: tweak key advancing condition

2015-06-03 Thread Naohiro Aota
The key advancing condition used in copy_to_sk() is loose. It can advance the key even if it reaches sk->max_*: e.g. when the max key = (512, 1024, -1) and the current key = (512, 1025, 10), it increments the offset by 1, continues hopeless search from (512, 1025, 11). This issue make ioctl() to

[PATCH] btrfs: tweak key advancing condition

2015-06-03 Thread Naohiro Aota
The key advancing condition used in copy_to_sk() is loose. It can advance the key even if it reaches sk-max_*: e.g. when the max key = (512, 1024, -1) and the current key = (512, 1025, 10), it increments the offset by 1, continues hopeless search from (512, 1025, 11). This issue make ioctl() to