Commit e3eec45
btrfs: always drop log root tree reference in btrfs_replay_log()
[ Upstream commit 2f5b8095ea47b142c56c09755a8b1e14145a2d30 ]
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 <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent 8e36ab6 commit e3eec45
2 files changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2087 | 2087 | | |
2088 | 2088 | | |
2089 | 2089 | | |
| 2090 | + | |
2090 | 2091 | | |
2091 | 2092 | | |
2092 | 2093 | | |
2093 | | - | |
2094 | 2094 | | |
2095 | 2095 | | |
2096 | 2096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7469 | 7469 | | |
7470 | 7470 | | |
7471 | 7471 | | |
7472 | | - | |
7473 | 7472 | | |
7474 | 7473 | | |
7475 | 7474 | | |
| |||
0 commit comments