aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b2588a552658..98b6a71decba 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2310,7 +2310,7 @@ int write_all_supers(struct btrfs_root *root, int max_mirrors)
2310 sb = &root->fs_info->super_for_commit; 2310 sb = &root->fs_info->super_for_commit;
2311 dev_item = &sb->dev_item; 2311 dev_item = &sb->dev_item;
2312 2312
2313 rcu_read_lock(); 2313 mutex_lock(&root->fs_info->fs_devices->device_list_mutex);
2314 head = &root->fs_info->fs_devices->devices; 2314 head = &root->fs_info->fs_devices->devices;
2315 list_for_each_entry_rcu(dev, head, dev_list) { 2315 list_for_each_entry_rcu(dev, head, dev_list) {
2316 if (!dev->bdev) { 2316 if (!dev->bdev) {
@@ -2355,7 +2355,7 @@ int write_all_supers(struct btrfs_root *root, int max_mirrors)
2355 if (ret) 2355 if (ret)
2356 total_errors++; 2356 total_errors++;
2357 } 2357 }
2358 rcu_read_unlock(); 2358 mutex_unlock(&root->fs_info->fs_devices->device_list_mutex);
2359 if (total_errors > max_errors) { 2359 if (total_errors > max_errors) {
2360 printk(KERN_ERR "btrfs: %d errors while writing supers\n", 2360 printk(KERN_ERR "btrfs: %d errors while writing supers\n",
2361 total_errors); 2361 total_errors);