aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2024-01-04 22:20:36 +0800
committerTheodore Ts'o <tytso@mit.edu>2024-01-18 10:50:24 -0500
commit2331fd4a49864e1571b4f50aa3aa1536ed6220d0 (patch)
tree2dde2b5911384834dd40f29111ccbdb8a6e005b1 /drivers/usb/cdns3/cdns3-debug.h
parentc9b528c35795b711331ed36dc3dbee90d5812d4e (diff)
ext4: avoid bb_free and bb_fragments inconsistency in mb_free_blocks()
After updating bb_free in mb_free_blocks, it is possible to return without updating bb_fragments because the block being freed is found to have already been freed, which leads to inconsistency between bb_free and bb_fragments. Since the group may be unlocked in ext4_grp_locked_error(), this can lead to problems such as dividing by zero when calculating the average fragment length. Hence move the update of bb_free to after the block double-free check guarantees that the corresponding statistics are updated only after the core block bitmap is modified. Fixes: eabe0444df90 ("ext4: speed-up releasing blocks on commit") CC: <stable@vger.kernel.org> # 3.10 Suggested-by: Jan Kara <jack@suse.cz> Signed-off-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20240104142040.2835097-5-libaokun1@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions