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:
parent
8c36e9dfe7
commit
d79bdd52d8
@ -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:
|
||||
|
@ -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) ||
|
||||
|
Loading…
Reference in New Issue
Block a user