Btrfs: fix oops when writing dirty qgroups to disk
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Wed, 14 Aug 2013 01:13:36 +0000 (09:13 +0800)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 12:15:45 +0000 (08:15 -0400)
commit4082bd3d734c41b122a91d2a5aded4b76baa84b2
treea4501aaa7647d46f757bf74141c3c329c1b7c577
parentba5e8f2e2d3074bf151dd222dae9bb400e621b82
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 <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Reviewed-by: Arne Jansen <sensille@gmx.net>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/qgroup.c