Skip to content

Commit 835ff5b

Browse files
asjkdave
authored andcommitted
btrfs-progs: rename local dev_list to devices in btrfs_alloc_chunk
Rename local dev_list to devices in btrfs_alloc_chunk, avoids confusion with btrfs_device::dev_list. Local variable dev_list currently points to btrfs_fs_devices::devices. Signed-off-by: Anand Jain <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent a30f59d commit 835ff5b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

kernel-shared/volumes.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
16881688
{
16891689
struct btrfs_device *device = NULL;
16901690
struct list_head private_devs;
1691-
struct list_head *dev_list = &info->fs_devices->devices;
1691+
struct list_head *devs = &info->fs_devices->devices;
16921692
struct list_head *cur;
16931693
u64 min_free;
16941694
u64 avail = 0;
@@ -1698,7 +1698,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
16981698
int ret;
16991699
int index;
17001700

1701-
if (list_empty(dev_list))
1701+
if (list_empty(devs))
17021702
return -ENOSPC;
17031703

17041704
ctl.type = type;
@@ -1715,7 +1715,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
17151715
return ret;
17161716

17171717
INIT_LIST_HEAD(&private_devs);
1718-
cur = dev_list->next;
1718+
cur = devs->next;
17191719
index = 0;
17201720

17211721
if (type & BTRFS_BLOCK_GROUP_DUP)
@@ -1737,11 +1737,11 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
17371737
index++;
17381738
} else if (avail > max_avail)
17391739
max_avail = avail;
1740-
if (cur == dev_list)
1740+
if (cur == devs)
17411741
break;
17421742
}
17431743
if (index < ctl.num_stripes) {
1744-
list_splice(&private_devs, dev_list);
1744+
list_splice(&private_devs, devs);
17451745
if (index >= ctl.min_stripes) {
17461746
ctl.num_stripes = index;
17471747
if (type & (BTRFS_BLOCK_GROUP_RAID10)) {
@@ -1773,13 +1773,13 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
17731773
while (!list_empty(&private_devs)) {
17741774
device = list_entry(private_devs.next, struct btrfs_device,
17751775
dev_list);
1776-
list_move(&device->dev_list, dev_list);
1776+
list_move(&device->dev_list, devs);
17771777
}
17781778
/*
17791779
* All private devs moved back to @dev_list, now dev_list should not be
17801780
* empty.
17811781
*/
1782-
ASSERT(!list_empty(dev_list));
1782+
ASSERT(!list_empty(devs));
17831783
*start = ctl.start;
17841784
*num_bytes = ctl.num_bytes;
17851785

0 commit comments

Comments
 (0)