diff options
author | Dongsheng Yang <yangds.fnst@cn.fujitsu.com> | 2015-02-27 03:24:26 -0500 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-04-13 10:52:58 -0400 |
commit | 8ea0ec9e011eb542a3e7b1171776aa4877cf8a90 (patch) | |
tree | 5f9cadb8ab87c751c5fe8cc7c0cde092282f0cfb | |
parent | 53b7cde9d5aa58cf7605664f0e34419156b02698 (diff) |
btrfs: qgroup: clear STATUS_FLAG_ON in disabling quota.
we forgot to clear STATUS_FLAG_ON in quota_disable(), it
will cause a problem shown as below:
# mount /dev/sdc /mnt
# btrfs quota enable /mnt
# btrfs quota disable /mnt
# btrfs quota rescan /mnt
quota rescan started <--- expecting it fail here.
# echo $?
0
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r-- | fs/btrfs/qgroup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 2e04e99f1e5b..f5f2baae7aa3 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c | |||
@@ -966,6 +966,7 @@ int btrfs_quota_disable(struct btrfs_trans_handle *trans, | |||
966 | fs_info->pending_quota_state = 0; | 966 | fs_info->pending_quota_state = 0; |
967 | quota_root = fs_info->quota_root; | 967 | quota_root = fs_info->quota_root; |
968 | fs_info->quota_root = NULL; | 968 | fs_info->quota_root = NULL; |
969 | fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_ON; | ||
969 | spin_unlock(&fs_info->qgroup_lock); | 970 | spin_unlock(&fs_info->qgroup_lock); |
970 | 971 | ||
971 | btrfs_free_qgroup_config(fs_info); | 972 | btrfs_free_qgroup_config(fs_info); |