From: Ira Weiny <ira.weiny@xxxxxxxxx> Use memcpy_page() instead of open coding kmap/memcpy/kunmap. Cc: Steve French <sfrench@xxxxxxxxx> Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx> --- fs/cifs/smb2ops.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 504766cb6c19..d1088ee9a0e6 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -4223,17 +4223,13 @@ smb3_init_transform_rq(struct TCP_Server_Info *server, int num_rqst, /* copy pages form the old */ for (j = 0; j < npages; j++) { - char *dst, *src; unsigned int offset, len; rqst_page_get_length(&new_rq[i], j, &len, &offset); - dst = (char *) kmap(new_rq[i].rq_pages[j]) + offset; - src = (char *) kmap(old_rq[i - 1].rq_pages[j]) + offset; - - memcpy(dst, src, len); - kunmap(new_rq[i].rq_pages[j]); - kunmap(old_rq[i - 1].rq_pages[j]); + memcpy_page(new_rq[i].rq_pages[j], offset, + old_rq[i - 1].rq_pages[j], offset, + len); } } -- 2.28.0.rc0.12.gb6a658bd00c9