summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorAnand Jain2018-04-12 04:29:26 +0200
committerDavid Sterba2018-05-28 18:07:21 +0200
commitf117e290e8efb5f1b2e5d83e559b73f2f0c1c3aa (patch)
tree1bb2d27c41b195e81a72d29128096c156b9e8fe8 /fs/btrfs/volumes.c
parentbtrfs: rename struct btrfs_fs_devices::list (diff)
downloadkernel-qcow2-linux-f117e290e8efb5f1b2e5d83e559b73f2f0c1c3aa.tar.gz
kernel-qcow2-linux-f117e290e8efb5f1b2e5d83e559b73f2f0c1c3aa.tar.xz
kernel-qcow2-linux-f117e290e8efb5f1b2e5d83e559b73f2f0c1c3aa.zip
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.c3
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;