]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
btrfs: document uuid_mutex uasge in read_chunk_tree
authorAnand Jain <anand.jain@oracle.com>
Thu, 12 Apr 2018 02:29:32 +0000 (10:29 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:23:14 +0000 (18:23 +0200)
read_chunk_tree() calls read_one_dev(), but for seed device we have
to search the fs_uuids list, so we need the uuid_mutex. Add a comment
comment, so that we can improve this part.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c

index a382d53c560af673acb3424de1620dd92ac6ab27..6eec1e3f90833c894f1cfd0b7b54f4f7adafc5d8 100644 (file)
@@ -6932,6 +6932,10 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)
        if (!path)
                return -ENOMEM;
 
+       /*
+        * uuid_mutex is needed only if we are mounting a sprout FS
+        * otherwise we don't need it.
+        */
        mutex_lock(&uuid_mutex);
        mutex_lock(&fs_info->chunk_mutex);