Re: [PATCH v4 3/3] btrfs: qgroup: fix sleep from invalid context bug in update_qgroup_limit_item()

From: ChenXiaoSong
Date: Tue Nov 15 2022 - 11:22:34 EST


在 2022/11/16 1:17, ChenXiaoSong 写道:
@@ -2987,6 +2986,7 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, u64 srcid,
dstgroup->max_excl = srcgroup->max_excl;
dstgroup->rsv_rfer = srcgroup->rsv_rfer;
dstgroup->rsv_excl = srcgroup->rsv_excl;
+ update_limit = false;
qgroup_dirty(fs_info, dstgroup);
qgroup_dirty(fs_info, srcgroup);

No need to call update_qgroup_limit_item() when condition "if (srcid)" is true according to Qu Wenruo's suggestions, btrfs_run_qgroups() will update the quota tree to reflect the result after calling qgroup_dirty().