Btrfs-progs: fix segfault in fsck if the chunk tree is bogus
authorJosef Bacik <jbacik@fusionio.com>
Thu, 28 Mar 2013 14:27:46 +0000 (10:27 -0400)
committerDavid Sterba <dsterba@suse.cz>
Tue, 23 Apr 2013 16:56:26 +0000 (18:56 +0200)
commit82ecc3670856efc9e9faa62bab75dd216ec2be94
treef54b366956e1f65a11eda93b26f946b037f88e58
parent1ed8193d19413dfa12ad069fe3458864e144297c
Btrfs-progs: fix segfault in fsck if the chunk tree is bogus

I made open_ctree fail if the chunk tree couldn't be open, which means that fsck
now segfaults if it can't open the chunk tree.  So fix fsck to check the fs_info
we get back from open_ctree_fsinfo to make sure it's valid and exit if it's not
instead of segfaulting.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
cmds-check.c