btrfs: fix use after free iterating extrefs
btrfs: fix use after free iterating extrefs

The code for btrfs inode-resolve has never worked properly for
files with enough hard links to trigger extrefs.  It was trying to
get the leaf out of a path after freeing the path:

	btrfs_release_path(path);
	leaf = path->nodes[0];
	item_size = btrfs_item_size_nr(leaf, slot);

The fix here is to use the extent buffer we cloned just a little higher
up to avoid deadlocks caused by using the leaf in the path.

Signed-off-by: Chris Mason <e2e8c5702d8ed5f565988a1cf5bb35c9ce199e5e@fb.com>
cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org # v3.7+
cc: Mark Fasheh <8f0bc92cac940f3e83deb53ced7a1f201bce5732@suse.de>
Reviewed-by: Filipe Manana <e0fcd583df77ec6c08e6d1257619cc1216ddc994@suse.com>
Reviewed-by: Mark Fasheh <8f0bc92cac940f3e83deb53ced7a1f201bce5732@suse.de>
Signed-off-by: Chris Mason <e2e8c5702d8ed5f565988a1cf5bb35c9ce199e5e@fb.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs