diff options
Diffstat (limited to 'fs/cifs/ioctl.c')
| -rw-r--r-- | fs/cifs/ioctl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index 28a77bf1d559..35cf990f87d3 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c | |||
| @@ -85,9 +85,14 @@ static long cifs_ioctl_clone(unsigned int xid, struct file *dst_file, | |||
| 85 | src_tcon = tlink_tcon(smb_file_src->tlink); | 85 | src_tcon = tlink_tcon(smb_file_src->tlink); |
| 86 | target_tcon = tlink_tcon(smb_file_target->tlink); | 86 | target_tcon = tlink_tcon(smb_file_target->tlink); |
| 87 | 87 | ||
| 88 | /* check if source and target are on same tree connection */ | 88 | /* check source and target on same server (or volume if dup_extents) */ |
| 89 | if (src_tcon != target_tcon) { | 89 | if (dup_extents && (src_tcon != target_tcon)) { |
| 90 | cifs_dbg(VFS, "file copy src and target on different volume\n"); | 90 | cifs_dbg(VFS, "source and target of copy not on same share\n"); |
| 91 | goto out_fput; | ||
| 92 | } | ||
| 93 | |||
| 94 | if (!dup_extents && (src_tcon->ses != target_tcon->ses)) { | ||
| 95 | cifs_dbg(VFS, "source and target of copy not on same server\n"); | ||
| 91 | goto out_fput; | 96 | goto out_fput; |
| 92 | } | 97 | } |
| 93 | 98 | ||
