btrfs: Report error on removing qgroup if del_qgroup_item fails
[muen/linux.git] / fs / btrfs / qgroup.c
index 770f667269f570d99f2e662cfb780eb5030023c3..e172d4843eae2d8eb6f0d29dce38fb7f693f4ed0 100644 (file)
@@ -1305,6 +1305,8 @@ int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
                }
        }
        ret = del_qgroup_item(trans, quota_root, qgroupid);
+       if (ret && ret != -ENOENT)
+               goto out;
 
        while (!list_empty(&qgroup->groups)) {
                list = list_first_entry(&qgroup->groups,