]> 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)
commit687a15cca4477d2a0dfb07c61317b3b54843e0d2
treefe51f95796bd4e6126c70bcc48e01ed08add3f57
parente765591f47948774e3a8411cd9ecd8212faaad50
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