Re: [PATCH 36/43] btrfs: hold a ref on the root in open_ctree

Nikolay Borisov
2020-01-22T10:48:33Z

On 17.01.20 г. 23:25 ч., Josef Bacik wrote:
> We lookup the fs_root and put it in our fs_info directly, we should hold
> a ref on this root for the lifetime of the fs_info. Rework the free'ing
> function so that it calls btrfs_put_fs_root() on the root at free time
> with all of the other global trees.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

So you not only hold a ref here but also refactor some cleanup code.
This definitely needs to be split into separate patches.