]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: qgroup: Fix a regression in qgroup reserved space.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 3 Aug 2015 06:44:29 +0000 (14:44 +0800)
committerChris Mason <clm@fb.com>
Thu, 6 Aug 2015 21:51:15 +0000 (14:51 -0700)
commitb385a0274464b0b70cfa07468c616c67d5a70055
tree42910e60d57a14d0989a49daa9010cc087d0f1ae
parent4da81c3880fd50b12f862511b71fd648be0dae09
btrfs: qgroup: Fix a regression in qgroup reserved space.

During the change to new btrfs extent-oriented qgroup implement, due to
it doesn't use the old __qgroup_excl_accounting() for exclusive extent,
it didn't free the reserved bytes.

The bug will cause limit function go crazy as the reserved space is
never freed, increasing limit will have no effect and still cause
EQOUT.

The fix is easy, just free reserved bytes for newly created exclusive
extent as what it does before.

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Yang Dongsheng <yangds.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/qgroup.c