]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: tree_search: eliminate redundant nr_items check
authorGerhard Heift <gerhard@heift.name>
Thu, 30 Jan 2014 15:23:57 +0000 (16:23 +0100)
committerChris Mason <clm@fb.com>
Fri, 13 Jun 2014 01:20:39 +0000 (18:20 -0700)
commit2e62b3ab1c1dc0c07703d159e146dd8ef162b89f
treefe51f95796bd4e6126c70bcc48e01ed08add3f57
parent5bf9a71c7bfb537937d7188e840051cc83ee45f3
btrfs: tree_search: eliminate redundant nr_items check

If the amount of items reached the given limit of nr_items, we can leave
copy_to_sk without updating the key. Also by returning 1 we leave the loop in
search_ioctl without rechecking if we reached the given limit.

Signed-off-by: Gerhard Heift <Gerhard@Heift.Name>
Signed-off-by: Chris Mason <clm@fb.com>
Acked-by: David Sterba <dsterba@suse.cz>
fs/btrfs/ioctl.c