mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 02:34:05 +08:00
btrfs: remove unnecessary tmp variable in btrfs_assign_next_active_device()
We can check the argument value directly, no need for the temporary variable. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1888709d71
commit
e493e8f9bc
@ -1962,16 +1962,13 @@ static struct btrfs_device * btrfs_find_next_active_device(
|
||||
* this_dev) which is active.
|
||||
*/
|
||||
void __cold btrfs_assign_next_active_device(struct btrfs_device *device,
|
||||
struct btrfs_device *this_dev)
|
||||
struct btrfs_device *next_device)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = device->fs_info;
|
||||
struct btrfs_device *next_device;
|
||||
|
||||
if (this_dev)
|
||||
next_device = this_dev;
|
||||
else
|
||||
if (!next_device)
|
||||
next_device = btrfs_find_next_active_device(fs_info->fs_devices,
|
||||
device);
|
||||
device);
|
||||
ASSERT(next_device);
|
||||
|
||||
if (fs_info->sb->s_bdev &&
|
||||
|
Loading…
Reference in New Issue
Block a user