Btrfs: only do the tree_mod_log_free_eb if this is our last ref
Btrfs: only do the tree_mod_log_free_eb if this is our last ref

There is another bug in the tree mod log stuff in that we're calling
tree_mod_log_free_eb every single time a block is cow'ed.  The problem with this
is that if this block is shared by multiple snapshots we will call this multiple
times per block, so if we go to rewind the mod log for this block we'll BUG_ON()
in __tree_mod_log_rewind because we try to rewind a free twice.  We only want to
call tree_mod_log_free_eb if we are actually freeing the block.  With this patch
I no longer hit the panic in __tree_mod_log_rewind.  Thanks,

Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org
Reviewed-by: Jan Schmidt <4f71970d0506cd4341522b2fa877abc3c9925755@jan-o-sch.net>
Signed-off-by: Josef Bacik <631dfb3d07694fdcf26abc7aac2c6c2b641f8bde@fusionio.com>

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