Skip to content

Commit

Permalink
... and a couple in net/9p
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jan 4, 2016
1 parent 93bbf58 commit 222e4ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/9p/trans_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static struct list_head virtio_chan_list;
/* How many bytes left in this page. */
static unsigned int rest_of_page(void *data)
{
return PAGE_SIZE - ((unsigned long)data % PAGE_SIZE);
return PAGE_SIZE - offset_in_page(data);
}

/**
Expand Down Expand Up @@ -365,7 +365,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
return -ENOMEM;

*need_drop = 0;
p -= (*offs = (unsigned long)p % PAGE_SIZE);
p -= (*offs = offset_in_page(p));
for (index = 0; index < nr_pages; index++) {
if (is_vmalloc_addr(p))
(*pages)[index] = vmalloc_to_page(p);
Expand Down

0 comments on commit 222e4ad

Please sign in to comment.