Btrfs: fix oops when writing dirty qgroups to disk
Btrfs: fix oops when writing dirty qgroups to disk

When disabling quota, we should clear out list 'dirty_qgroups',otherwise,
we will get oops if enabling quota again. Fix this by abstracting similar
code from del_qgroup_rb().

Signed-off-by: Wang Shilong <a6ffe7a539d70ea74089829fdeeb6c8d6acce33c@cn.fujitsu.com>
Reviewed-by: Miao Xie <d7fac3f7b328449401fe64671e732ac315caee28@cn.fujitsu.com>
Reviewed-by: Arne Jansen <1ac75ecdee0e8d99a7251fd3af35e29d91a85db3@gmx.net>
Signed-off-by: Josef Bacik <631dfb3d07694fdcf26abc7aac2c6c2b641f8bde@fusionio.com>
Signed-off-by: Chris Mason <a169954b4cb1a46cee25f659d3bddfebe02b5fba@fusionio.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs