qcow2: Split fail code in L1 and L2 checks
commitad27390c85c50df402c7ec0d3864fc43e6559fb3
authorMax Reitz <mreitz@redhat.com>
Wed, 22 Oct 2014 12:09:34 +0000 (22 14:09 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 23 Oct 2014 13:34:01 +0000 (23 15:34 +0200)
tree23ae91d9c1dfe2af3d9983da4cb3a3542646044a
parent713d9675e0e31c627d08b6a33d3a92e4b8505b40
qcow2: Split fail code in L1 and L2 checks

Instead of printing out an error message, incrementing check_errors and
returning a fixed -errno, just do cleanups and return -ret, with ret set
by the code which threw the exception (jumped to the fail label).

Also, increment check_errors on error in check_refcounts_l2().

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-refcount.c