btrfs: Report error on removing qgroup if del_qgroup_item fails
authorSargun Dhillon <[email protected]>
Sun, 17 Sep 2017 09:02:29 +0000 (09:02 +0000)
committerDavid Sterba <[email protected]>
Tue, 26 Sep 2017 12:54:01 +0000 (14:54 +0200)
commit36b96fdc6b2dc6f4a0fedc563fa7508c91b90a10
treef570c3e39fcb38ef16de37bb8847db98611c45ec
parente6311f240c946788131ba2b97e14f37312688072
btrfs: Report error on removing qgroup if del_qgroup_item fails

Previously, we were calling del_qgroup_item, and ignoring the return code
resulting in a potential to have divergent in-memory state without an
error. Perhaps, it makes sense to handle this error code, and put the
filesystem into a read only, or similar state.

This patch only adds reporting of the error if the error is fatal,
(any error other than qgroup not found).

Signed-off-by: Sargun Dhillon <[email protected]>
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
fs/btrfs/qgroup.c