Skip to content

Commit

Permalink
btrfs: insert newly opened device to the end of the list
Browse files Browse the repository at this point in the history
Add opened device to the tail of dev_alloc_list instead of head, so that
it maintains the same order as dev_list.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Anand Jain authored and David Sterba committed Mar 26, 2018
1 parent f8e10cd commit b1b8e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ static int btrfs_open_one_device(struct btrfs_fs_devices *fs_devices,
if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) &&
device->devid != BTRFS_DEV_REPLACE_DEVID) {
fs_devices->rw_devices++;
list_add(&device->dev_alloc_list, &fs_devices->alloc_list);
list_add_tail(&device->dev_alloc_list, &fs_devices->alloc_list);
}
brelse(bh);

Expand Down

0 comments on commit b1b8e38

Please sign in to comment.