Skip to content
Commit e2156867 authored by Hugo Mills's avatar Hugo Mills Committed by Chris Mason
Browse files

btrfs: Ensure the tree search ioctl returns the right number of records



Btrfs's tree search ioctl has a field to indicate that no more than a
given number of records should be returned. The ioctl doesn't honour
this, as the tested value is not incremented until the end of the
copy_to_sk function. This patch removes an unnecessary local variable,
and updates the num_found counter as each key is found in the tree.

Signed-off-by: default avatarHugo Mills <hugo@carfax.org.uk>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 0956c798
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