diff options
author | Anand Jain <anand.jain@oracle.com> | 2018-04-12 05:29:26 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 19:07:21 +0300 |
commit | f117e290e8efb5f1b2e5d83e559b73f2f0c1c3aa (patch) | |
tree | 1bb2d27c41b195e81a72d29128096c156b9e8fe8 /fs/btrfs/volumes.c | |
parent | c4babc5e38e94e70058218ebfbf7846fd2f8a24d (diff) | |
download | linux-f117e290e8efb5f1b2e5d83e559b73f2f0c1c3aa.tar.xz |
btrfs: cleanup __btrfs_open_devices() drop head pointer
__btrfs_open_devices() declares struct list_head *head, however head is
used only once, instead use btrfs_fs_devices::devices directly.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index e1394bbcc540..7fac89f4f316 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1104,14 +1104,13 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices) static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices, fmode_t flags, void *holder) { - struct list_head *head = &fs_devices->devices; struct btrfs_device *device; struct btrfs_device *latest_dev = NULL; int ret = 0; flags |= FMODE_EXCL; - list_for_each_entry(device, head, dev_list) { + list_for_each_entry(device, &fs_devices->devices, dev_list) { /* Just open everything we can; ignore failures here */ if (btrfs_open_one_device(fs_devices, device, flags, holder)) continue; |