]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: switch to RCU for device traversal in btrfs_ioctl_dev_info
authorDavid Sterba <dsterba@suse.com>
Thu, 15 Jun 2017 22:09:21 +0000 (00:09 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:12 +0000 (16:08 +0100)
commitd7da1d6bfbd54f21edddaff17c4b71d7f94eeab6
treec5e197d2ff5f6b6065408dd346a4d09a1c01451f
parentfb73a98ac65711581da6d32a78ec283147006c1f
btrfs: switch to RCU for device traversal in btrfs_ioctl_dev_info

We don't need to use the mutex as we do not modify the devices nor the
list itself and just read some information:

does not change during device lifetime:
- devid
- uuid
- name (ie. the path)

may change in parallel to the ioctl call, but can lead only to reporting
inacurracy:
- bytes_used
- total_bytes

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c