Commit 403eb8a
btrfs: always drop log root tree reference in btrfs_replay_log()
[ Upstream commit 2f5b809 ]
Currently we have this odd behaviour:
1) At btrfs_replay_log() we drop the reference of the log root tree if
the call to btrfs_recover_log_trees() failed;
2) But if the call to btrfs_recover_log_trees() did not fail, we don't
drop the reference in btrfs_replay_log() - we expect that
btrfs_recover_log_trees() does it in case it returns success.
Let's simplify this and make btrfs_replay_log() always drop the reference
on the log root tree, not only this simplifies code as it's what makes
sense since it's btrfs_replay_log() who grabbed the reference in the first
place.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 500784a commit 403eb8a
2 files changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2100 | 2100 | | |
2101 | 2101 | | |
2102 | 2102 | | |
| 2103 | + | |
2103 | 2104 | | |
2104 | 2105 | | |
2105 | 2106 | | |
2106 | | - | |
2107 | 2107 | | |
2108 | 2108 | | |
2109 | 2109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7457 | 7457 | | |
7458 | 7458 | | |
7459 | 7459 | | |
7460 | | - | |
7461 | 7460 | | |
7462 | 7461 | | |
7463 | 7462 | | |
| |||
0 commit comments