]> git.hungrycats.org Git - linux/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)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Fri, 27 Mar 2015 03:27:34 +0000 (23:27 -0400)
commit67afd96510cbfac1f231ae6b1ed29cfeea0ba9d0
treea2f47069dbf0a48c752bc8ea5d8290a5228a8ec1
parente72ee02b60bf96c72dbcae1eb11fe7798ea3b905
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>
(cherry picked from commit 0ee13fe28ce387864c0d2b1e8c52b64abe2fcd02)
fs/btrfs/qgroup.c