Zach Brown f276795627 btrfs: fix btrfs_cont_expand() freeing IS_ERR em
btrfs_cont_expand() tries to free an IS_ERR em as it gets an error from
btrfs_get_extent() and breaks out of its loop.

An instance of -EEXIST was reported in the wild:

  https://bugzilla.redhat.com/show_bug.cgi?id=874407

I have no idea if that -EEXIST is surprising, or not.  Regardless, this
error handling should be cleaned up to handle other reasonable errors
(ENOMEM, EIO; whatever).

This seemed to be the only buggy freeing of the relatively rare IS_ERR
em so I opted to fix the caller rather than teach free_extent_map() to
use IS_ERR_OR_NULL().

Signed-off-by: Zach Brown <zab@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
2013-01-14 13:53:23 -05:00
..
2012-12-17 14:48:21 -05:00
2012-12-17 14:48:21 -05:00
2012-05-29 23:28:33 -04:00
2012-10-09 09:14:45 -04:00
2012-10-09 09:14:45 -04:00
2011-06-17 14:54:18 -04:00
2012-10-01 15:18:53 -04:00
2012-10-01 15:18:53 -04:00
2012-10-09 09:19:57 -04:00