Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp735973imm; Thu, 13 Sep 2018 07:02:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbEsvwd0XinabirJDL44AEZVla4rGgAX9yqLzP/+kp15gw8/iXhouWoGXL6d2xFip4UmVOs X-Received: by 2002:a17:902:be08:: with SMTP id r8-v6mr7519157pls.265.1536847348654; Thu, 13 Sep 2018 07:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847348; cv=none; d=google.com; s=arc-20160816; b=QIcYyrR8LESNNuNDlS802BeKLg12PhMC5bqGipPuWIXbhCdyhtT4AOer+qNXch4g3W CDwh5BE1kWCMoVtDEgtDsrqwUrjDdPjcIg4u2lH0qXBiUu+Q/Ix2zg4UR5HgrdK9Kmyo X4Dg8Avlz9nlbFVzcltHaQpByAqBw15gpbXQGceIPWZoLndSC8G8UDpHnfBN37yGIw0e 6q817snNfI7d3J5YnBHkGSjdDB31vv7u1whvpXw0zqXe0m4+Otoga1CTfXLC09rPFeHN ue4Hr/WxseKuf1NhikKLzX4sEcJop7pM0HyP8LvU41gh87w+iPdKG6s4gRNQm9/pwTtp GlzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=gru4pzSiJtaux7dvqE96na7R3QPSgVbQbp5Yn4bYGho=; b=dv7iItISGyjsVyft8k5k62leBgvRVc8/uROHwbgB+rxzsZAQ7PuCV/BzsUqQ6bLgeF ZvsC3AmHTltEpFkp93I5AAAaygi6bgm82AXqCEwz2l8hI5oPU1sJFW5qw9igtAzAqW/p qO2SXTssdWWt8fPUWn7E3hSNS6QUjENdYd1AnOerGvjcKRwRPLRB8EGkL07RbtMZhb0I aHn/WqEXSw+UJoAHVhR/ALQTeiMXv5x9lFRtU3sWlu4caoBMSrV3uUAQcU6GrAUk5jBW lxwaMOBGiI1rsVLYh5Na+4F1wGJKSEYybdYAdfRodSzZTc1q6ya5qzgGUdFKVK0t8KO4 QkTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9-v6si3941165pff.370.2018.09.13.07.02.07; Thu, 13 Sep 2018 07:02:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731910AbeIMTLf (ORCPT + 99 others); Thu, 13 Sep 2018 15:11:35 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35120 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731505AbeIMTLe (ORCPT ); Thu, 13 Sep 2018 15:11:34 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 43C49D28; Thu, 13 Sep 2018 14:01:56 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anand Jain , David Sterba , Sasha Levin Subject: [PATCH 4.18 146/197] btrfs: rename local devices for fs_devices in btrfs_free_stale_devices( Date: Thu, 13 Sep 2018 15:31:35 +0200 Message-Id: <20180913131847.397320096@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Anand Jain [ Upstream commit fa6d2ae540a200a17bb7ee769f9df22d411c9404 ] Over the years we named %fs_devices and %devices to represent the struct btrfs_fs_devices and the struct btrfs_device. So follow the same scheme here too. No functional changes. Signed-off-by: Anand Jain Signed-off-by: David Sterba Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/volumes.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -634,43 +634,42 @@ static void pending_bios_fn(struct btrfs * devices. */ static void btrfs_free_stale_devices(const char *path, - struct btrfs_device *skip_dev) + struct btrfs_device *skip_device) { - struct btrfs_fs_devices *fs_devs, *tmp_fs_devs; - struct btrfs_device *dev, *tmp_dev; + struct btrfs_fs_devices *fs_devices, *tmp_fs_devices; + struct btrfs_device *device, *tmp_device; - list_for_each_entry_safe(fs_devs, tmp_fs_devs, &fs_uuids, fs_list) { - - if (fs_devs->opened) + list_for_each_entry_safe(fs_devices, tmp_fs_devices, &fs_uuids, fs_list) { + if (fs_devices->opened) continue; - list_for_each_entry_safe(dev, tmp_dev, - &fs_devs->devices, dev_list) { + list_for_each_entry_safe(device, tmp_device, + &fs_devices->devices, dev_list) { int not_found = 0; - if (skip_dev && skip_dev == dev) + if (skip_device && skip_device == device) continue; - if (path && !dev->name) + if (path && !device->name) continue; rcu_read_lock(); if (path) - not_found = strcmp(rcu_str_deref(dev->name), + not_found = strcmp(rcu_str_deref(device->name), path); rcu_read_unlock(); if (not_found) continue; /* delete the stale device */ - if (fs_devs->num_devices == 1) { - btrfs_sysfs_remove_fsid(fs_devs); - list_del(&fs_devs->fs_list); - free_fs_devices(fs_devs); + if (fs_devices->num_devices == 1) { + btrfs_sysfs_remove_fsid(fs_devices); + list_del(&fs_devices->fs_list); + free_fs_devices(fs_devices); break; } else { - fs_devs->num_devices--; - list_del(&dev->dev_list); - btrfs_free_device(dev); + fs_devices->num_devices--; + list_del(&device->dev_list); + btrfs_free_device(device); } } }