Commit 222e4ade authored by Al Viro's avatar Al Viro

... and a couple in net/9p

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 93bbf583
...@@ -105,7 +105,7 @@ static struct list_head virtio_chan_list; ...@@ -105,7 +105,7 @@ static struct list_head virtio_chan_list;
/* How many bytes left in this page. */ /* How many bytes left in this page. */
static unsigned int rest_of_page(void *data) static unsigned int rest_of_page(void *data)
{ {
return PAGE_SIZE - ((unsigned long)data % PAGE_SIZE); return PAGE_SIZE - offset_in_page(data);
} }
/** /**
...@@ -365,7 +365,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, ...@@ -365,7 +365,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
return -ENOMEM; return -ENOMEM;
*need_drop = 0; *need_drop = 0;
p -= (*offs = (unsigned long)p % PAGE_SIZE); p -= (*offs = offset_in_page(p));
for (index = 0; index < nr_pages; index++) { for (index = 0; index < nr_pages; index++) {
if (is_vmalloc_addr(p)) if (is_vmalloc_addr(p))
(*pages)[index] = vmalloc_to_page(p); (*pages)[index] = vmalloc_to_page(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment