]> git.hungrycats.org Git - linux/commit
btrfs: drop the extent maps of the written part of a failed ordered extent
authorTal Zussman <tz2294@columbia.edu>
Thu, 15 Oct 2026 14:43:14 +0000 (10:43 -0400)
committerDavid Sterba <dsterba@suse.com>
Fri, 16 Oct 2026 17:06:56 +0000 (19:06 +0200)
commit13aea5907f1d0b10abfb3e40355a65e9bbcdccf5
tree4bbf7302adc0d996765ffc6fc29c14c56aec8ec7
parentec0795c045c325c53f6b774ab8d812bea96706ba
btrfs: drop the extent maps of the written part of a failed ordered extent

If a truncated ordered extent fails to complete, the extent maps for the
part that was written are kept while the extent itself is freed below.
A later read can follow them to blocks that have been reallocated.
Drop the maps for the whole range on error.

Fixes: 77cef2ec5484 ("Btrfs: allow partial ordered extent completion")
Assisted-by: LLM
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c