]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Add check to avoid cleanup roots already in fs_info->dead_roots.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Tue, 22 Apr 2014 09:13:51 +0000 (17:13 +0800)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:20:35 +0000 (17:20 -0700)
commitebd815c165905a74ee68992b0c84425544eb1ee4
treea4de22a193e48b0adb451ceeec2ad1f91544dde5
parentfd9d3019a2873ab5d78c66f6212494753dd43f2e
btrfs: Add check to avoid cleanup roots already in fs_info->dead_roots.

Current btrfs_orphan_cleanup will also cleanup roots which is already in
fs_info->dead_roots without protection.
This will have conditional race with fs_info->cleaner_kthread.

This patch will use refs in root->root_item to detect roots in
dead_roots and avoid conflicts.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/disk-io.c