Merge tag 'vfs-6.9.super' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[linux-2.6-microblaze.git] / fs / btrfs / ioctl.c
index 9d1eac1..9876ee2 100644 (file)
@@ -2698,7 +2698,7 @@ static long btrfs_ioctl_rm_dev_v2(struct file *file, void __user *arg)
        struct inode *inode = file_inode(file);
        struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
        struct btrfs_ioctl_vol_args_v2 *vol_args;
-       struct bdev_handle *bdev_handle = NULL;
+       struct file *bdev_file = NULL;
        int ret;
        bool cancel = false;
 
@@ -2735,7 +2735,7 @@ static long btrfs_ioctl_rm_dev_v2(struct file *file, void __user *arg)
                goto err_drop;
 
        /* Exclusive operation is now claimed */
-       ret = btrfs_rm_device(fs_info, &args, &bdev_handle);
+       ret = btrfs_rm_device(fs_info, &args, &bdev_file);
 
        btrfs_exclop_finish(fs_info);
 
@@ -2749,8 +2749,8 @@ static long btrfs_ioctl_rm_dev_v2(struct file *file, void __user *arg)
        }
 err_drop:
        mnt_drop_write_file(file);
-       if (bdev_handle)
-               bdev_release(bdev_handle);
+       if (bdev_file)
+               fput(bdev_file);
 out:
        btrfs_put_dev_args_from_path(&args);
        kfree(vol_args);
@@ -2763,7 +2763,7 @@ static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg)
        struct inode *inode = file_inode(file);
        struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
        struct btrfs_ioctl_vol_args *vol_args;
-       struct bdev_handle *bdev_handle = NULL;
+       struct file *bdev_file = NULL;
        int ret;
        bool cancel = false;
 
@@ -2790,15 +2790,15 @@ static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg)
        ret = exclop_start_or_cancel_reloc(fs_info, BTRFS_EXCLOP_DEV_REMOVE,
                                           cancel);
        if (ret == 0) {
-               ret = btrfs_rm_device(fs_info, &args, &bdev_handle);
+               ret = btrfs_rm_device(fs_info, &args, &bdev_file);
                if (!ret)
                        btrfs_info(fs_info, "disk deleted %s", vol_args->name);
                btrfs_exclop_finish(fs_info);
        }
 
        mnt_drop_write_file(file);
-       if (bdev_handle)
-               bdev_release(bdev_handle);
+       if (bdev_file)
+               fput(bdev_file);
 out:
        btrfs_put_dev_args_from_path(&args);
        kfree(vol_args);