2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-13 15:53:56 +08:00

vfs: wire up compat ioctl for CLONE/CLONE_RANGE

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Darrick J. Wong 2015-12-19 00:55:52 -08:00 committed by Al Viro
parent 8c36e9dfe7
commit d79bdd52d8
2 changed files with 5 additions and 1 deletions

View File

@ -1580,6 +1580,10 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd,
goto out_fput;
#endif
case FICLONE:
case FICLONERANGE:
goto do_ioctl;
case FIBMAP:
case FIGETBSZ:
case FIONREAD:

View File

@ -1489,7 +1489,7 @@ int vfs_clone_file_range(struct file *file_in, loff_t pos_in,
if (S_ISDIR(inode_in->i_mode) || S_ISDIR(inode_out->i_mode))
return -EISDIR;
if (!S_ISREG(inode_in->i_mode) || !S_ISREG(inode_out->i_mode))
return -EOPNOTSUPP;
return -EINVAL;
if (!(file_in->f_mode & FMODE_READ) ||
!(file_out->f_mode & FMODE_WRITE) ||