summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2017-12-07 11:10:05 +0200
committerDavid Sterba <dsterba@suse.com>2018-01-31 15:14:01 +0100
commit8075fd4da1a5c759261413461a4bd7f9af81722c (patch)
treee1ce1da4ea6ef05be6bfcb191fd8642ae77e2190 /disk-io.c
parent90a00b3c79584eee7c282623c39ec88d3662be25 (diff)
btrfs-progs: Replace usage of list_for_each with list_for_each_entry
There are a couple of places where instead of the more succinct list_for_each_entry the code uses list_for_each. This results in slightly more code with no additional benefit as well as no coherent pattern. This patch makes the code uniform. No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> [ remove unused variable in uuid_search ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/disk-io.c b/disk-io.c
index f5edc479..3d8785d5 100644
--- 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;