]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: handle discard errors in in btrfs_finish_extent_commit()
authorJingkai Tan <contact@jingk.ai>
Thu, 22 Jan 2026 21:14:10 +0000 (21:14 +0000)
committerDavid Sterba <dsterba@suse.com>
Thu, 26 Feb 2026 14:03:26 +0000 (15:03 +0100)
commit2970525f789c080e7e82ecb09cd85a8bb1d284e4
tree1920a837c7ca4e70952025bd18602f3a9cb597e5
parentecb7c2484cfc83a93658907580035a8adf1e0a92
btrfs: handle discard errors in in btrfs_finish_extent_commit()

Coverity (ID: 1226842) reported that the return value of
btrfs_discard_extent() is assigned to ret but is immediately
overwritten by unpin_extent_range() without being checked.

Use the same error handling that is done later in the same function.

Signed-off-by: Jingkai Tan <contact@jingk.ai>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c