btrfs-progs: check: Fix wrong level access
authorHugo Mills <hugo@carfax.org.uk>
Mon, 5 May 2014 17:07:49 +0000 (18:07 +0100)
committerDavid Sterba <dsterba@suse.cz>
Fri, 22 Aug 2014 12:43:10 +0000 (14:43 +0200)
commitb5fc0b90144c37532f68839f36be08e05c0767bf
tree31d9c1dbd14c582e529003f466cc1ea2e79839bc
parent8efdd3ca4cbeaf51908f04ba9ea1fb689a30241f
btrfs-progs: check: Fix wrong level access

There's no reason to assume that the bad key order is in a leaf block,
so accessing level 0 of the path is going to be an error if it's actually
a node block that's bad.

Reported-by: Chris Mason <clm@fb.com>
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-check.c