Re: [PATCH] btrfs: fix bytes_may_use underflow after a failed tree block allocation

From: Qu Wenruo

Date: Fri Nov 13 2026 - 16:36:16 EST




在 2026/11/14 03:39, Vlad Poenaru 写道:
[...]

Fixes: 67b7859e9bfa ("btrfs: handle ENOMEM in btrfs_alloc_tree_block")
Cc: stable@xxxxxxxxxxxxxxx # 6.16+
Signed-off-by: Vlad Poenaru <vlad.wing@xxxxxxxxx>

Can you simplify the commit message, not only by a little but by a ton?

I'm not against LLM generated commit message/code, but the end result should still be human reader friendly.
This looks very ChatGPT, which I hate a lot as chatGPT commit messages are a pain in the backend.

This over 100 lines commit message is definitely not human-friendly. I hate if I need to use LLM to just summarize the commit message.

To be honest, most (if not all) of your commit message can be extracted into a single call trace graph:

btrfs_alloc_tree_block()
|- btrfs_use_block_rsv()
|- btrfs_reserve_extent()
| \- btrfs_add_reserved_bytes() <- bytes_may_use -= blocksize
|
|- btrfs_init_new_buffer()
| \- alloc_extent_buffer() <- fails with -ENOMEM
|
|- btrfs_free_reserved_extent() <- bytes_reserved -= blocksize
\- btrfs_unuse_block_rsv() <- block rsv += blocksize again

I really hope you can update the memory file to let your agent not generate too much words salads.