diff options
Diffstat (limited to 'fs/btrfs/qgroup.c')
-rw-r--r-- | fs/btrfs/qgroup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 5c8b61c86e61..e172d4843eae 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c | |||
@@ -807,7 +807,6 @@ static int btrfs_clean_quota_tree(struct btrfs_trans_handle *trans, | |||
807 | } | 807 | } |
808 | ret = 0; | 808 | ret = 0; |
809 | out: | 809 | out: |
810 | set_bit(BTRFS_FS_QUOTA_DISABLING, &root->fs_info->flags); | ||
811 | btrfs_free_path(path); | 810 | btrfs_free_path(path); |
812 | return ret; | 811 | return ret; |
813 | } | 812 | } |
@@ -953,7 +952,6 @@ int btrfs_quota_disable(struct btrfs_trans_handle *trans, | |||
953 | if (!fs_info->quota_root) | 952 | if (!fs_info->quota_root) |
954 | goto out; | 953 | goto out; |
955 | clear_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags); | 954 | clear_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags); |
956 | set_bit(BTRFS_FS_QUOTA_DISABLING, &fs_info->flags); | ||
957 | btrfs_qgroup_wait_for_completion(fs_info, false); | 955 | btrfs_qgroup_wait_for_completion(fs_info, false); |
958 | spin_lock(&fs_info->qgroup_lock); | 956 | spin_lock(&fs_info->qgroup_lock); |
959 | quota_root = fs_info->quota_root; | 957 | quota_root = fs_info->quota_root; |
@@ -1307,6 +1305,8 @@ int btrfs_remove_qgroup(struct btrfs_trans_handle *trans, | |||
1307 | } | 1305 | } |
1308 | } | 1306 | } |
1309 | ret = del_qgroup_item(trans, quota_root, qgroupid); | 1307 | ret = del_qgroup_item(trans, quota_root, qgroupid); |
1308 | if (ret && ret != -ENOENT) | ||
1309 | goto out; | ||
1310 | 1310 | ||
1311 | while (!list_empty(&qgroup->groups)) { | 1311 | while (!list_empty(&qgroup->groups)) { |
1312 | list = list_first_entry(&qgroup->groups, | 1312 | list = list_first_entry(&qgroup->groups, |
@@ -2086,8 +2086,6 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans, | |||
2086 | 2086 | ||
2087 | if (test_and_clear_bit(BTRFS_FS_QUOTA_ENABLING, &fs_info->flags)) | 2087 | if (test_and_clear_bit(BTRFS_FS_QUOTA_ENABLING, &fs_info->flags)) |
2088 | set_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags); | 2088 | set_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags); |
2089 | if (test_and_clear_bit(BTRFS_FS_QUOTA_DISABLING, &fs_info->flags)) | ||
2090 | clear_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags); | ||
2091 | 2089 | ||
2092 | spin_lock(&fs_info->qgroup_lock); | 2090 | spin_lock(&fs_info->qgroup_lock); |
2093 | while (!list_empty(&fs_info->dirty_qgroups)) { | 2091 | while (!list_empty(&fs_info->dirty_qgroups)) { |