mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
cifs: fix pcchunk length type in smb2_copychunk_range
commitd66cde50c3upstream. Change type of pcchunk->Length from u32 to u64 to match smb2_copychunk_range arguments type. Fixes the problem where performing server-side copy with CIFS_IOC_COPYCHUNK_FILE ioctl resulted in incomplete copy of large files while returning -EINVAL. Fixes:9bf0c9cd43("CIFS: Fix SMB2/SMB3 Copy offload support (refcopy) for large files") Cc: <stable@vger.kernel.org> Signed-off-by: Pawel Witek <pawel.ireneusz.witek@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c5544c95ad
commit
187f89cff7
@@ -1682,7 +1682,7 @@ smb2_copychunk_range(const unsigned int xid,
|
|||||||
pcchunk->SourceOffset = cpu_to_le64(src_off);
|
pcchunk->SourceOffset = cpu_to_le64(src_off);
|
||||||
pcchunk->TargetOffset = cpu_to_le64(dest_off);
|
pcchunk->TargetOffset = cpu_to_le64(dest_off);
|
||||||
pcchunk->Length =
|
pcchunk->Length =
|
||||||
cpu_to_le32(min_t(u32, len, tcon->max_bytes_chunk));
|
cpu_to_le32(min_t(u64, len, tcon->max_bytes_chunk));
|
||||||
|
|
||||||
/* Request server copy to target from src identified by key */
|
/* Request server copy to target from src identified by key */
|
||||||
kfree(retbuf);
|
kfree(retbuf);
|
||||||
|
|||||||
Reference in New Issue
Block a user