btrfs: rename __btrfs_close_devices to close_fs_devices
[sfrench/cifs-2.6.git] / fs / btrfs / volumes.c
index e1394bbcc54081980d3b05ca77f11a133c296c94..9400f3935d275bc288c0a1c21589df6ebf6d6e52 100644 (file)
@@ -1040,7 +1040,7 @@ static void btrfs_prepare_close_one_device(struct btrfs_device *device)
        new_device->fs_devices = device->fs_devices;
 }
 
-static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
+static int close_fs_devices(struct btrfs_fs_devices *fs_devices)
 {
        struct btrfs_device *device, *tmp;
        struct list_head pending_put;
@@ -1085,7 +1085,7 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
        int ret;
 
        mutex_lock(&uuid_mutex);
-       ret = __btrfs_close_devices(fs_devices);
+       ret = close_fs_devices(fs_devices);
        if (!fs_devices->opened) {
                seed_devices = fs_devices->seed;
                fs_devices->seed = NULL;
@@ -1095,7 +1095,7 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
        while (seed_devices) {
                fs_devices = seed_devices;
                seed_devices = fs_devices->seed;
-               __btrfs_close_devices(fs_devices);
+               close_fs_devices(fs_devices);
                free_fs_devices(fs_devices);
        }
        return ret;
@@ -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;
@@ -2065,7 +2064,7 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
                        fs_devices = fs_devices->seed;
                }
                cur_devices->seed = NULL;
-               __btrfs_close_devices(cur_devices);
+               close_fs_devices(cur_devices);
                free_fs_devices(cur_devices);
        }
 
@@ -2147,7 +2146,7 @@ void btrfs_rm_dev_replace_free_srcdev(struct btrfs_fs_info *fs_info,
                        tmp_fs_devices = tmp_fs_devices->seed;
                }
                fs_devices->seed = NULL;
-               __btrfs_close_devices(fs_devices);
+               close_fs_devices(fs_devices);
                free_fs_devices(fs_devices);
        }
 }
@@ -6728,7 +6727,7 @@ static struct btrfs_fs_devices *open_seed_devices(struct btrfs_fs_info *fs_info,
        }
 
        if (!fs_devices->seeding) {
-               __btrfs_close_devices(fs_devices);
+               close_fs_devices(fs_devices);
                free_fs_devices(fs_devices);
                fs_devices = ERR_PTR(-EINVAL);
                goto out;