btrfs-progs: Fix the return value of btrfs_scan_kernel()
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Tue, 8 Apr 2014 09:16:02 +0000 (17:16 +0800)
committerDavid Sterba <dsterba@suse.cz>
Tue, 22 Apr 2014 12:34:27 +0000 (14:34 +0200)
commitccd14cbf62026fd84113bcf886732fcc3391cb5b
tree221f0705c8e208c67d590607dd19e9cdfa9bd265
parent30156b749bd7ceeec3f75f676c07aedafd26799c
btrfs-progs: Fix the return value of btrfs_scan_kernel()

btrfs_scan_kernel() is only used in 'btrfs fi show' but returns wrong
return value.  When search parameter is passed, it will never return 0
even the search can be matched.

This patch will change the whatever strange logic to a more easy to
understand one using 'found' var.

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-filesystem.c