xfs: rework refcount cow recovery error handling
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 10 Oct 2016 06:23:07 +0000 (17:23 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 10 Oct 2016 06:23:07 +0000 (17:23 +1100)
commit6f97077ff6ef28e0f3b361b6ba9c95a222ef384b
treec541a0d113af184d0d45e3eddb3f89d434fdad58
parent1987fd743415564e8c67f2f7ec0ae3c18a6b11cd
xfs: rework refcount cow recovery error handling

The error handling in xfs_refcount_recover_cow_leftovers is confused
and can potentially leak memory, so rework it to release resources
correctly on error.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_refcount.c