Btrfs: make sure roots are assigned before freeing their nodes
authorJosef Bacik <jbacik@fusionio.com>
Fri, 17 May 2013 18:06:51 +0000 (14:06 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Sat, 18 May 2013 01:40:38 +0000 (21:40 -0400)
commit655b09fe540b73edeaabfb4c2d700be51a1f8bce
treeee5239ddbadcd4aed7266f61653e28e990bb2978
parent3a6cad9009c85e29e83aafc8ac00b1dd5067fc5f
Btrfs: make sure roots are assigned before freeing their nodes

If we fail to load the chunk tree we'll call free_root_pointers, except we may
not have assigned the roots for the dev_root/extent_root/csum_root yet, so we
could NULL pointer deref at this point.  Just add checks to make sure these
roots are set to keep us from panicing.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c