Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Btrfs: fix race between balance recovery and root deletion
Balance recovery is called when RW mounting or remounting from RO to RW, it is called to finish roots merging. When doing balance recovery, relocation root's corresponding fs root(whose root refs is 0) might be destroyed by cleaner thread, this will make btrfs fail to mount. Fix this problem by holding @cleaner_mutex when doing balance recovery. Signed-off-by: Wang Shilong <[email protected]> Signed-off-by: Chris Mason <[email protected]>
- Loading branch information