Re: [PATCH 1/7] btrfs: do more trivial BTRFS_PATH_AUTO_FREE conversions

David Disseldorp
2025-04-02T00:40:00Z

Hi David

On Wed, 2 Apr 2025 01:18:06 +0200, David Sterba wrote:

> @@ -308,7 +308,7 @@ int btrfs_truncate_free_space_cache(struct btrfs_trans_handle *trans,
> bool locked = false;
>
> if (block_group) {
> - struct btrfs_path *path = btrfs_alloc_path();
> + BTRFS_PATH_AUTO_FREE(path);
>
> if (!path) {
> ret = -ENOMEM;

This one looks broken. btrfs_search_slot() needs it allocated.