diff options
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index d28e1761fdeb..a15c8ac5d5b3 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -50,7 +50,7 @@ static void __btrfs_reset_dev_stats(struct btrfs_device *dev); | |||
50 | static void btrfs_dev_stat_print_on_error(struct btrfs_device *dev); | 50 | static void btrfs_dev_stat_print_on_error(struct btrfs_device *dev); |
51 | static void btrfs_dev_stat_print_on_load(struct btrfs_device *device); | 51 | static void btrfs_dev_stat_print_on_load(struct btrfs_device *device); |
52 | 52 | ||
53 | static DEFINE_MUTEX(uuid_mutex); | 53 | DEFINE_MUTEX(uuid_mutex); |
54 | static LIST_HEAD(fs_uuids); | 54 | static LIST_HEAD(fs_uuids); |
55 | 55 | ||
56 | static void lock_chunks(struct btrfs_root *root) | 56 | static void lock_chunks(struct btrfs_root *root) |
@@ -1867,6 +1867,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info, | |||
1867 | { | 1867 | { |
1868 | struct btrfs_device *next_device; | 1868 | struct btrfs_device *next_device; |
1869 | 1869 | ||
1870 | mutex_lock(&uuid_mutex); | ||
1870 | WARN_ON(!tgtdev); | 1871 | WARN_ON(!tgtdev); |
1871 | mutex_lock(&fs_info->fs_devices->device_list_mutex); | 1872 | mutex_lock(&fs_info->fs_devices->device_list_mutex); |
1872 | if (tgtdev->bdev) { | 1873 | if (tgtdev->bdev) { |
@@ -1886,6 +1887,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info, | |||
1886 | call_rcu(&tgtdev->rcu, free_device); | 1887 | call_rcu(&tgtdev->rcu, free_device); |
1887 | 1888 | ||
1888 | mutex_unlock(&fs_info->fs_devices->device_list_mutex); | 1889 | mutex_unlock(&fs_info->fs_devices->device_list_mutex); |
1890 | mutex_unlock(&uuid_mutex); | ||
1889 | } | 1891 | } |
1890 | 1892 | ||
1891 | static int btrfs_find_device_by_path(struct btrfs_root *root, char *device_path, | 1893 | static int btrfs_find_device_by_path(struct btrfs_root *root, char *device_path, |