]> git.hungrycats.org Git - linux/commit
btrfs: forbid deleting live subvol qgroup
authorBoris Burkov <boris@bur.io>
Thu, 11 Jan 2024 01:30:00 +0000 (17:30 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:55:01 +0000 (08:55 +0100)
commit980e2bee30f1d7b6abea8db7388b6cdbafc92a91
treeb6ec03fac27bde60b22fc9177ca2a1e343450520
parente31546b0f34af21738c4ceac47d662c00ee6382f
btrfs: forbid deleting live subvol qgroup

commit a8df35619948bd8363d330c20a90c9a7fbff28c0 upstream.

If a subvolume still exists, forbid deleting its qgroup 0/subvolid.
This behavior generally leads to incorrect behavior in squotas and
doesn't have a legitimate purpose.

Fixes: cecbb533b5fc ("btrfs: record simple quota deltas in delayed refs")
CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/qgroup.c