]> git.hungrycats.org Git - linux/commit
btrfs: abort transaction on failure to update inode for hole punching and reflinking
authorFilipe Manana <fdmanana@suse.com>
Wed, 16 Sep 2026 14:43:41 +0000 (15:43 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 17 Sep 2026 16:20:15 +0000 (18:20 +0200)
commitd9abc55d70e71b5d2876948043ba70c0f6200c4c
treec887b97081cd35c32a540bf417e4b75b7702e99d
parent5321707948bfcf3a9d13073b310ae3095a04e523
btrfs: abort transaction on failure to update inode for hole punching and reflinking

If we fail to update the inode we error out without aborting the
transaction, which can result in a persistent inconsistency if after
the failure the transaction is committed, as we have dropped file
extent items from a range and either punched a hole or insert a new file
extent item for that range (for reflinks).

So add the missing transaction abort.

Fixes: 2aaa66558172 ("Btrfs: add hole punching")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c