mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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>
This commit is contained in:
parent
c4babc5e38
commit
f117e290e8
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue