Re: [PATCH 2/3] btrfs-progs: tune: fix the missing close()

Anand Jain
2024-02-02T09:01:39Z

On 2/2/24 06:29, Qu Wenruo wrote:
> [BUG]
> In "btrfs tune" subcomammand, we're using open_ctree_fd(), which
> requires passing a valid fd, and the caller is responsible to properly
> handling the lifespan of the fd.
>
> But we just call close_ctree() and btrfs_close_all_devices(), without
> closing the fd.
>
> [FIX]
> Just manually close the fd.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>

Reviewed-by: Anand Jain <anand.jain@oracle.com>

Thx. Anand