Skip to content

Commit ee59716

Browse files
committed
netfs: 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. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 605a97e commit ee59716

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/netfs/iterator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static ssize_t netfs_extract_kvec_to_sg(struct iov_iter *iter,
240240
if (is_vmalloc_or_module_addr((void *)kaddr))
241241
page = vmalloc_to_page((void *)kaddr);
242242
else
243-
page = virt_to_page(kaddr);
243+
page = virt_to_page((void *)kaddr);
244244

245245
sg_set_page(sg, page, len, off);
246246
sgtable->nents++;

0 commit comments

Comments
 (0)