Skip to content

Commit 1db3af8

Browse files
committed
cifs: Pass a pointer to virt_to_page()
Like the other calls in this function virt_to_page() expects a pointer, not an integer. However since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). Fix this up with an explicit cast. Acked-by: Tom Talpey <tom@talpey.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent a7d270d commit 1db3af8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/smbdirect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2500,7 +2500,7 @@ static ssize_t smb_extract_kvec_to_rdma(struct iov_iter *iter,
25002500
if (is_vmalloc_or_module_addr((void *)kaddr))
25012501
page = vmalloc_to_page((void *)kaddr);
25022502
else
2503-
page = virt_to_page(kaddr);
2503+
page = virt_to_page((void *)kaddr);
25042504

25052505
if (!smb_set_sge(rdma, page, off, seg))
25062506
return -EIO;

0 commit comments

Comments
 (0)