Skip to content

Commit 52c7234

Browse files
kdavemehmetb0
authored andcommitted
btrfs: delete pointless BUG_ON check on quota root in btrfs_qgroup_account_extent()
BugLink: https://bugs.launchpad.net/bugs/2084005 [ Upstream commit f40a3ea94881f668084f68f6b9931486b1606db0 ] The BUG_ON is deep in the qgroup code where we can expect that it exists. A NULL pointer would cause a crash. It was added long ago in 550d7a2 ("btrfs: qgroup: Add new qgroup calculation function btrfs_qgroup_account_extents()."). It maybe made sense back then as the quota enable/disable state machine was not that robust as it is nowadays, so we can just delete it. Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent c8df8d8 commit 52c7234

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/btrfs/qgroup.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,8 +2878,6 @@ int btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans, u64 bytenr,
28782878
if (nr_old_roots == 0 && nr_new_roots == 0)
28792879
goto out_free;
28802880

2881-
BUG_ON(!fs_info->quota_root);
2882-
28832881
trace_btrfs_qgroup_account_extent(fs_info, trans->transid, bytenr,
28842882
num_bytes, nr_old_roots, nr_new_roots);
28852883

0 commit comments

Comments
 (0)