| To: | david@xxxxxxxxxxxxx, darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | [PATCH 7/9] vfs: wire up compat ioctl for CLONE/CLONE_RANGE |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Sat, 19 Dec 2015 00:55:52 -0800 |
| Cc: | linux-fsdevel@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20151219085505.12478.71157.stgit@xxxxxxxxxxxxxxxx> |
| References: | <20151219085505.12478.71157.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | StGit/0.17.1-dirty |
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
fs/compat_ioctl.c | 4 ++++
fs/read_write.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index dcf2653..70d4b10 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -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:
diff --git a/fs/read_write.c b/fs/read_write.c
index 6395c733..0713e28 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -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) ||
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 5/9] locks: new locks_mandatory_area calling convention, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH 6/9] vfs: pull btrfs clone API to vfs layer, Darrick J. Wong |
| Previous by Thread: | [PATCH 5/9] locks: new locks_mandatory_area calling convention, Darrick J. Wong |
| Next by Thread: | [PATCH 6/9] vfs: pull btrfs clone API to vfs layer, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |