mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
btrfs: clear log tree recovering status if starting transaction fails
[ Upstream commit1aeb6b563a
] When a log recovery is in progress, lots of operations have to take that into account, so we keep this status per tree during the operation. Long time ago error handling revamp patch79787eaab4
("btrfs: replace many BUG_ONs with proper error handling") removed clearing of the status in an error branch. Add it back as was intended ine02119d5a7
("Btrfs: Add a write ahead tree log to optimize synchronous operations"). There are probably no visible effects, log replay is done only during mount and if it fails all structures are cleared so the stale status won't be kept. Fixes:79787eaab4
("btrfs: replace many BUG_ONs with proper error handling") Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a0876d9dc1
commit
fa3f33b20b
1 changed files with 1 additions and 0 deletions
|
@ -6327,6 +6327,7 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
|
|||
error:
|
||||
if (wc.trans)
|
||||
btrfs_end_transaction(wc.trans);
|
||||
clear_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags);
|
||||
btrfs_free_path(path);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue