btrfs: qgroup: return EINVAL if level of parent is not higher than child's.
authorDongsheng Yang <yangds.fnst@cn.fujitsu.com>
Tue, 11 Nov 2014 12:18:22 +0000 (07:18 -0500)
committerChris Mason <clm@fb.com>
Mon, 13 Apr 2015 14:52:51 +0000 (07:52 -0700)
commit09870d2772b284d0061a5e4d1e1cdf6fb6764344
tree165d3cbb7ab0be6a0c1ae1120658b31a8ad39f2b
parente2d1f92399afb6ec518b68867ed10db2585b283a
btrfs: qgroup: return EINVAL if level of parent is not higher than child's.

When we create a subvol inheriting a qgroup, we need to check the level
of them. Otherwise, there is a chance a qgroup can inherit another qgroup
at the same level.

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