]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: qgroup: move WARN_ON() to the correct location.
authorYang Dongsheng <yangds.fnst@cn.fujitsu.com>
Tue, 6 Jan 2015 12:54:42 +0000 (20:54 +0800)
committerChris Mason <clm@fb.com>
Thu, 22 Jan 2015 02:22:37 +0000 (18:22 -0800)
commit41dc06cac22ffa45f4eeb80773f1a66554cb55a3
tree3d0d556d357af39c09a21eef88eb0b11deece387
parentf8457b62fc049fa6376afb6b33082bbc6d6a8f35
btrfs: qgroup: move WARN_ON() to the correct location.

In function qgroup_excl_accounting(), we need to WARN when
qg->excl is less than what we want to free, same to child
and parents. But currently, for parent qgroup, the WARN_ON()
is located after freeing qg->excl. It will WARN out even we
free it normally.

This patch move this WARN_ON() before freeing qg->excl.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/qgroup.c