summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorNikolay Borisov2019-05-09 17:11:11 +0200
committerDavid Sterba2019-07-01 13:34:59 +0200
commit0b6f5d408bb5df3101eb1944b1f301dea50c7e7e (patch)
tree1e4cc071f098729f54b015990f77704290a58531 /fs/btrfs/volumes.c
parentbtrfs: Always use a cached extent_state in btrfs_lock_and_flush_ordered_range (diff)
downloadkernel-qcow2-linux-0b6f5d408bb5df3101eb1944b1f301dea50c7e7e.tar.gz
kernel-qcow2-linux-0b6f5d408bb5df3101eb1944b1f301dea50c7e7e.tar.xz
kernel-qcow2-linux-0b6f5d408bb5df3101eb1944b1f301dea50c7e7e.zip
btrfs: Add comments on locking of several device-related fields
Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 5514ae801f4c..776f5c7ca7c5 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -239,7 +239,9 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
* chunk_mutex
* -----------
* protects chunks, adding or removing during allocation, trim or when a new
- * device is added/removed
+ * device is added/removed. Additionally it also protects post_commit_list of
+ * individual devices, since they can be added to the transaction's
+ * post_commit_list only with chunk_mutex held.
*
* cleaner_mutex
* -------------