Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f117e290 authored by Anand Jain's avatar Anand Jain Committed by David Sterba
Browse files

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: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c4babc5e
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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,
static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
				fmode_t flags, void *holder)
				fmode_t flags, void *holder)
{
{
	struct list_head *head = &fs_devices->devices;
	struct btrfs_device *device;
	struct btrfs_device *device;
	struct btrfs_device *latest_dev = NULL;
	struct btrfs_device *latest_dev = NULL;
	int ret = 0;
	int ret = 0;


	flags |= FMODE_EXCL;
	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 */
		/* Just open everything we can; ignore failures here */
		if (btrfs_open_one_device(fs_devices, device, flags, holder))
		if (btrfs_open_one_device(fs_devices, device, flags, holder))
			continue;
			continue;