diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-11-13 12:52:45 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-24 22:42:24 +0100 |
| commit | e7dd1182fcedee7c6097c9f49eba8de94a4364e3 (patch) | |
| tree | b004500c459e426c60972bc5c91914b39c9a35d0 /fs/btrfs/dev-replace.c | |
| parent | 280dd7c106fd4c47756d19f6ae89862bb7bf7225 (diff) | |
btrfs: fix leaf leak in an error path in btrfs_del_items()
If the call to btrfs_del_leaf() fails we return without decrementing the
extra ref we took on the leaf, therefore leaking it. Fix this by ensuring
we drop the ref count before returning the error.
Fixes: 751a27615dda ("btrfs: do not BUG_ON() on tree mod log failures at btrfs_del_ptr()")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions