]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ioctl.c
ubifs: Reject unsupported ioctl flags explicitly
[mirror_ubuntu-bionic-kernel.git] / fs / ioctl.c
index 5ace7efb0d04d2c0d4201e0fa24176be43b6e69c..7181e42bf77ea061ea23ed8827f4987325f6ddac 100644 (file)
@@ -229,7 +229,7 @@ static long ioctl_file_clone(struct file *dst_file, unsigned long srcfd,
        ret = -EXDEV;
        if (src_file.file->f_path.mnt != dst_file->f_path.mnt)
                goto fdput;
-       ret = do_clone_file_range(src_file.file, off, dst_file, destoff, olen);
+       ret = vfs_clone_file_range(src_file.file, off, dst_file, destoff, olen);
 fdput:
        fdput(src_file);
        return ret;
@@ -549,7 +549,7 @@ static int ioctl_fsfreeze(struct file *filp)
 {
        struct super_block *sb = file_inode(filp)->i_sb;
 
-       if (!capable(CAP_SYS_ADMIN))
+       if (!ns_capable(sb->s_user_ns, CAP_SYS_ADMIN))
                return -EPERM;
 
        /* If filesystem doesn't support freeze feature, return. */
@@ -566,7 +566,7 @@ static int ioctl_fsthaw(struct file *filp)
 {
        struct super_block *sb = file_inode(filp)->i_sb;
 
-       if (!capable(CAP_SYS_ADMIN))
+       if (!ns_capable(sb->s_user_ns, CAP_SYS_ADMIN))
                return -EPERM;
 
        /* Thaw */