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)
commitc5593ca3c8a82eb397804e22a34d2c7061b55f56
treec5e197d2ff5f6b6065408dd346a4d09a1c01451f
parent08ffcae8c92e7154ba5fb78c926463a21cba6501
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