btrfs-progs: rescue: properly close the fs for clear-ino-cache

[BUG]
In cmd_rescue_clear_ino_cache(), we opened the fs, but without
closing it using close_ctree().

[CAUSE]

This was introduced in 42404a4e44 ("btrfs-progs: move inode cache
removal to rescue group"), the original code inside btrfs check
had a "goto out_close;" to properly close the fs.

[FIX]
Manually call close_ctree() on the fs_info->tree_root.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2024-02-02 11:29:19 +10:30 committed by David Sterba
parent fed3806d08
commit da1d497a16
1 changed files with 1 additions and 0 deletions

View File

@ -451,6 +451,7 @@ static int cmd_rescue_clear_ino_cache(const struct cmd_struct *cmd,
} else {
pr_verbose(LOG_DEFAULT, "Successfully cleared ino cache");
}
close_ctree(fs_info->tree_root);
out:
return !!ret;
}