char *device_name, *opts, *orig, *p;
int error = 0;
+ lockdep_assert_held(&uuid_mutex);
+
if (!options)
return 0;
error = -ENOMEM;
goto out;
}
- mutex_lock(&uuid_mutex);
error = btrfs_scan_one_device(device_name,
flags, holder, fs_devices);
- mutex_unlock(&uuid_mutex);
kfree(device_name);
if (error)
goto out;
if (!(flags & SB_RDONLY))
mode |= FMODE_WRITE;
+ mutex_lock(&uuid_mutex);
error = btrfs_parse_early_options(data, mode, fs_type,
&fs_devices);
+ mutex_unlock(&uuid_mutex);
if (error) {
return ERR_PTR(error);
}