From: Anand Jain Date: Thu, 12 Apr 2018 02:29:32 +0000 (+0800) Subject: btrfs: document uuid_mutex uasge in read_chunk_tree X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3dd0f7a3644eed9017f62ccd0067a91e8260d097;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- 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) 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);