Jeff Mahoney 692826b273 btrfs: handle errors while updating refcounts in update_ref_for_cow
Since commit fb235dc06fa (btrfs: qgroup: Move half of the qgroup
accounting time out of commit trans) the assumption that
btrfs_add_delayed_{data,tree}_ref can only return 0 or -ENOMEM has
been false.  The qgroup operations call into btrfs_search_slot
and friends and can now return the full spectrum of error codes.

Fortunately, the fix here is easy since update_ref_for_cow failing
is already handled so we just need to bail early with the error
code.

Fixes: fb235dc06fa (btrfs: qgroup: Move half of the qgroup accounting ...)
Cc: <stable@vger.kernel.org> # v4.11+
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Edmund Nadolski <enadolski@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-12-07 00:30:03 +01:00
..
2017-09-04 19:05:15 -04:00
2017-08-24 13:23:03 -07:00
2017-10-18 18:51:27 -04:00
2017-09-18 12:24:26 +02:00
2017-09-11 22:01:44 -07:00
2017-07-06 03:31:46 -04:00
2017-09-08 19:33:25 -07:00
2017-10-26 08:45:40 +02:00
2017-09-04 19:05:15 -04:00
2017-04-17 12:52:27 -04:00
2017-10-18 14:51:50 -04:00
2017-06-22 11:44:55 -04:00
2017-07-06 03:27:09 -04:00
2017-07-06 03:27:09 -04:00
2017-05-08 17:15:12 -07:00
2017-08-17 22:06:03 +02:00
2017-09-03 20:24:30 -04:00