diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-09-02 17:08:19 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-09-23 08:49:20 +0200 |
| commit | f9c02e4b525d766bebfcbeac1b25b03aacfe62f1 (patch) | |
| tree | 11fab15f46766fb81407d9a21ddbfd1bb2c7c524 /fs/btrfs/tree-log.c | |
| parent | 9bdfa3eddb67e73f57d1e527e1ba2dcca3bd08c4 (diff) | |
btrfs: remove redundant path release when overwriting item during log replay
At overwrite_item() we have a redundant btrfs_release_path() just before
failing with -ENOMEM, as the caller who passed in the path will free it
and therefore also release any refcounts and locks on the extent buffers
of the path. So remove it.
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/tree-log.c')
| -rw-r--r-- | fs/btrfs/tree-log.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 65b8858e82d1..66500ebdd35c 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -471,7 +471,6 @@ static int overwrite_item(struct walk_control *wc, struct btrfs_path *path) } src_copy = kmalloc(item_size, GFP_NOFS); if (!src_copy) { - btrfs_release_path(path); btrfs_abort_transaction(trans, -ENOMEM); return -ENOMEM; } |