Patch "btrfs: delete pointless BUG_ON check on quota root in btrfs_qgroup_account_extent()" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    btrfs: delete pointless BUG_ON check on quota root in btrfs_qgroup_account_extent()

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     btrfs-delete-pointless-bug_on-check-on-quota-root-in.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit bf02b9e07be6c5fb4e5eb08dc2b4e0538e5bfe8e
Author: David Sterba <dsterba@xxxxxxxx>
Date:   Tue Feb 6 23:20:53 2024 +0100

    btrfs: delete pointless BUG_ON check on quota root in btrfs_qgroup_account_extent()
    
    [ 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 550d7a2ed5db35 ("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@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index ef95525fa6cdf..770e6f652a1e5 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -2095,8 +2095,6 @@ int btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans, u64 bytenr,
 	if (nr_old_roots == 0 && nr_new_roots == 0)
 		goto out_free;
 
-	BUG_ON(!fs_info->quota_root);
-
 	trace_btrfs_qgroup_account_extent(fs_info, trans->transid, bytenr,
 					num_bytes, nr_old_roots, nr_new_roots);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux