Skip to content

Commit bdc6cc8

Browse files
committed
btrfs: btrfs_free_stale_devices() rename local variables
Over the years we named %fs_devices and %devices to represent, the struct btrfs_fs_devices and the struct btrfs_device. So follow the same norm here too. No functional changes. Signed-off-by: Anand Jain <anand.jain@oracle.com>
1 parent 0dd1ff5 commit bdc6cc8

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

fs/btrfs/volumes.c

+18-17
Original file line numberDiff line numberDiff line change
@@ -631,43 +631,44 @@ static void pending_bios_fn(struct btrfs_work *work)
631631
* devices.
632632
*/
633633
static void btrfs_free_stale_devices(const char *path,
634-
struct btrfs_device *skip_dev)
634+
struct btrfs_device *skip_device)
635635
{
636-
struct btrfs_fs_devices *fs_devs, *tmp_fs_devs;
637-
struct btrfs_device *dev, *tmp_dev;
636+
struct btrfs_fs_devices *fs_devices, *tmp_fs_devices;
637+
struct btrfs_device *device, *tmp_device;
638638

639-
list_for_each_entry_safe(fs_devs, tmp_fs_devs, &fs_uuids, fs_list) {
639+
list_for_each_entry_safe(fs_devices, tmp_fs_devices, &fs_uuids,
640+
fs_list) {
640641

641-
if (fs_devs->opened)
642+
if (fs_devices->opened)
642643
continue;
643644

644-
list_for_each_entry_safe(dev, tmp_dev,
645-
&fs_devs->devices, dev_list) {
645+
list_for_each_entry_safe(device, tmp_device,
646+
&fs_devices->devices, dev_list) {
646647
int not_found = 0;
647648

648-
if (skip_dev && skip_dev == dev)
649+
if (skip_device && skip_device == device)
649650
continue;
650-
if (path && !dev->name)
651+
if (path && !device->name)
651652
continue;
652653

653654
rcu_read_lock();
654655
if (path)
655-
not_found = strcmp(rcu_str_deref(dev->name),
656+
not_found = strcmp(rcu_str_deref(device->name),
656657
path);
657658
rcu_read_unlock();
658659
if (not_found)
659660
continue;
660661

661662
/* delete the stale device */
662-
if (fs_devs->num_devices == 1) {
663-
btrfs_sysfs_remove_fsid(fs_devs);
664-
list_del(&fs_devs->fs_list);
665-
free_fs_devices(fs_devs);
663+
if (fs_devices->num_devices == 1) {
664+
btrfs_sysfs_remove_fsid(fs_devices);
665+
list_del(&fs_devices->fs_list);
666+
free_fs_devices(fs_devices);
666667
break;
667668
} else {
668-
fs_devs->num_devices--;
669-
list_del(&dev->dev_list);
670-
btrfs_free_device(dev);
669+
fs_devices->num_devices--;
670+
list_del(&device->dev_list);
671+
btrfs_free_device(device);
671672
}
672673
}
673674
}

0 commit comments

Comments
 (0)