btrfs-progs: Replace usage of list_for_each with list_for_each_entry
[platform/upstream/btrfs-progs.git] / disk-io.c
index f5edc47..3d8785d 100644 (file)
--- a/disk-io.c
+++ b/disk-io.c
@@ -1556,7 +1556,6 @@ write_err:
 
 int write_all_supers(struct btrfs_fs_info *fs_info)
 {
-       struct list_head *cur;
        struct list_head *head = &fs_info->fs_devices->devices;
        struct btrfs_device *dev;
        struct btrfs_super_block *sb;
@@ -1566,8 +1565,7 @@ int write_all_supers(struct btrfs_fs_info *fs_info)
 
        sb = fs_info->super_copy;
        dev_item = &sb->dev_item;
-       list_for_each(cur, head) {
-               dev = list_entry(cur, struct btrfs_device, dev_list);
+       list_for_each_entry(dev, head, dev_list) {
                if (!dev->writeable)
                        continue;