mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
btrfs: insert newly opened device to the end of the list
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>
This commit is contained in:
parent
f8e10cd3f8
commit
b1b8e38622
1 changed files with 1 additions and 1 deletions
|
@ -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) &&
|
if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) &&
|
||||||
device->devid != BTRFS_DEV_REPLACE_DEVID) {
|
device->devid != BTRFS_DEV_REPLACE_DEVID) {
|
||||||
fs_devices->rw_devices++;
|
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);
|
brelse(bh);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue