btrfs: refactor btrfs_find_device() take fs_devices as argument
CVE-2019-18885 btrfs_find_device() accepts fs_info as an argument and retrieves fs_devices from fs_info. Instead use fs_devices, so that this function can be used in non-mount (during device scanning) context as well. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> (backported from commit e4319cd9) [ Connor Kuehl: many of these functions had not yet been refactored to pass a `struct btrfs_fs_info *` and instead still operate with a root pointer. Update the call sites to pass in the fs_info struct pointer via the root pointer. ] Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com> Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Showing
Please register or sign in to comment