btrfs: abort transaction if we don't find extref in btrfs_del_inode_extref()
authorDavid Sterba <dsterba@suse.com>
Wed, 22 May 2024 15:28:10 +0000 (17:28 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:27 +0000 (15:33 +0200)
commitf4f89477322295e0f0ea10aa3e617afe2a827fc5
tree9742d55adfefba703215621b2458919e32a71085
parenteba1469f8f6a4c98d9cfdba2477fac82a2347c6c
btrfs: abort transaction if we don't find extref in btrfs_del_inode_extref()

When an extended ref is deleted we do a sanity check right before
removing the item, if we can't find it then handle the error. This is
done by btrfs_handle_fs_error() but this is from the time before we had
the transaction abort infrastructure, so switch to that. The end result
is the same, the error is reported and switched to read-only. We newly
return the -ENOENT error code as this better represents what happened.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode-item.c