btrfs_sysfs_remove_device(src_device);
        btrfs_sysfs_update_devid(tgt_device);
        if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &src_device->dev_state))
-               btrfs_scratch_superblocks(fs_info, src_device->bdev,
-                                         src_device->name->str);
+               btrfs_scratch_superblocks(fs_info, src_device);
 
        /* write back the superblocks */
        trans = btrfs_start_transaction(root, 0);
 
                        copy_num, ret);
 }
 
-void btrfs_scratch_superblocks(struct btrfs_fs_info *fs_info,
-                              struct block_device *bdev,
-                              const char *device_path)
+void btrfs_scratch_superblocks(struct btrfs_fs_info *fs_info, struct btrfs_device *device)
 {
        int copy_num;
+       struct block_device *bdev = device->bdev;
 
        if (!bdev)
                return;
        btrfs_kobject_uevent(bdev, KOBJ_CHANGE);
 
        /* Update ctime/mtime for device path for libblkid */
-       update_dev_time(device_path);
+       update_dev_time(device->name->str);
 }
 
 int btrfs_rm_device(struct btrfs_fs_info *fs_info,
         * device and let the caller do the final bdev_release.
         */
        if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) {
-               btrfs_scratch_superblocks(fs_info, device->bdev,
-                                         device->name->str);
+               btrfs_scratch_superblocks(fs_info, device);
                if (device->bdev) {
                        sync_blockdev(device->bdev);
                        invalidate_bdev(device->bdev);
 
        mutex_unlock(&fs_devices->device_list_mutex);
 
-       btrfs_scratch_superblocks(tgtdev->fs_info, tgtdev->bdev,
-                                 tgtdev->name->str);
+       btrfs_scratch_superblocks(tgtdev->fs_info, tgtdev);
 
        btrfs_close_bdev(tgtdev);
        synchronize_rcu();
 
 struct list_head * __attribute_const__ btrfs_get_fs_uuids(void);
 bool btrfs_check_rw_degradable(struct btrfs_fs_info *fs_info,
                                        struct btrfs_device *failing_dev);
-void btrfs_scratch_superblocks(struct btrfs_fs_info *fs_info,
-                              struct block_device *bdev,
-                              const char *device_path);
+void btrfs_scratch_superblocks(struct btrfs_fs_info *fs_info, struct btrfs_device *device);
 
 enum btrfs_raid_types __attribute_const__ btrfs_bg_flags_to_raid_index(u64 flags);
 int btrfs_bg_type_to_factor(u64 flags);