diff options
author | Anand Jain <anand.jain@oracle.com> | 2018-04-11 22:29:32 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 12:23:14 -0400 |
commit | 3dd0f7a3644eed9017f62ccd0067a91e8260d097 (patch) | |
tree | 260dcd8c0c37507536b947a29822367388358da6 | |
parent | 41a52a0f1bdcb3a17e2b384d6b6368a9590f9a58 (diff) |
btrfs: document uuid_mutex uasge in read_chunk_tree
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>
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index a382d53c560a..6eec1e3f9083 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -6932,6 +6932,10 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info) | |||
6932 | if (!path) | 6932 | if (!path) |
6933 | return -ENOMEM; | 6933 | return -ENOMEM; |
6934 | 6934 | ||
6935 | /* | ||
6936 | * uuid_mutex is needed only if we are mounting a sprout FS | ||
6937 | * otherwise we don't need it. | ||
6938 | */ | ||
6935 | mutex_lock(&uuid_mutex); | 6939 | mutex_lock(&uuid_mutex); |
6936 | mutex_lock(&fs_info->chunk_mutex); | 6940 | mutex_lock(&fs_info->chunk_mutex); |
6937 | 6941 | ||