diff options
author | Mike Marshall <hubcap@omnibond.com> | 2015-11-16 10:58:57 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2015-11-16 10:58:57 -0500 |
commit | a52079dad4718fa924ae81a939f8a665366f562b (patch) | |
tree | a9d6004f9bf1beff49cbfe0d5bf6edbf621b065d /fs/cifs/ioctl.c | |
parent | 24c8d0804be00da90af9efa8eb404bd7a3284ba9 (diff) | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) | |
download | op-kernel-dev-a52079dad4718fa924ae81a939f8a665366f562b.zip op-kernel-dev-a52079dad4718fa924ae81a939f8a665366f562b.tar.gz |
Orangefs: Merge tag 'v4.4-rc1' into for-next
Linux 4.4-rc1
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 28a77bf..35cf990 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, src_tcon = tlink_tcon(smb_file_src->tlink); target_tcon = tlink_tcon(smb_file_target->tlink); - /* check if source and target are on same tree connection */ - if (src_tcon != target_tcon) { - cifs_dbg(VFS, "file copy src and target on different volume\n"); + /* check source and target on same server (or volume if dup_extents) */ + if (dup_extents && (src_tcon != target_tcon)) { + cifs_dbg(VFS, "source and target of copy not on same share\n"); + goto out_fput; + } + + if (!dup_extents && (src_tcon->ses != target_tcon->ses)) { + cifs_dbg(VFS, "source and target of copy not on same server\n"); goto out_fput; } |